vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 92270e5f363bfb0358da40d2bc0542563fbd27f0 parent 23263ab8e4f8c32b840c4bb47e350dc3caa39418 Author: Kelsey Judson <kelseyjudson@protonmail.com> Date: Mon, 22 Oct 2018 18:26:13 +1300 lexers: ruby squiggly heredocs Diffstat:
| M | lua/lexers/ruby.lua | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/lexers/ruby.lua b/lua/lexers/ruby.lua @@ -42,7 +42,7 @@ local dq_str = l.delimited_range('"') local lit_str = '%' * S('qQ')^-1 * literal_delimitted local heredoc = '<<' * P(function(input, index) local s, e, indented, _, delimiter = - input:find('(%-?)(["`]?)([%a_][%w_]*)%2[\n\r\f;]+', index) + input:find('([%-~]?)(["`]?)([%a_][%w_]*)%2[\n\r\f;]+', index) if s == index and delimiter then local end_heredoc = (#indented > 0 and '[\n\r\f]+ *' or '[\n\r\f]+') local _, e = input:find(end_heredoc..delimiter, e)