From 7c0d10f458a9292bc65064264c63fb01401438d3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 23 Mar 2018 13:42:48 +0000 Subject: [PATCH] ruby.kak: support squiggly heredocs Squiggly heredocs were introduced in Ruby 2.3. They work like `<<-` but strip indentation. --- rc/base/ruby.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index b9745998..e6035043 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -22,7 +22,7 @@ add-highlighter shared/ regions -default code -match-capture ruby \ literal '%[iqrswxIQRSWX]\{' \} \{ \ literal '%[iqrswxIQRSWX]\[' \] \[ \ literal '%[iqrswxIQRSWX]<' > < \ - heredoc '<<-?(\w+)' '^\h*(\w+)$' '' \ + heredoc '<<[-~]?(\w+)' '^\h*(\w+)$' '' \ division '[\w\)\]](/|(\h+/\h+))' '\w' '' # Help Kakoune to better detect /…/ literals # Regular expression flags are: i → ignore case, m → multi-lines, o → only interpolate #{} blocks once, x → extended mode (ignore white spaces)