diff options
| author | Kelsey Judson <kelseyjudson@protonmail.com> | 2018-10-22 18:26:13 +1300 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-10 09:18:56 +0100 |
| commit | 8ecc5915690112a2ea02ee3a9d4c30c017f6bb98 (patch) | |
| tree | 9b2048f2da71fb82a2779224345cbdcd93922e2a | |
| parent | 305bac1a0f9621f28a27a9665d87a7db3d32befc (diff) | |
| download | vis-8ecc5915690112a2ea02ee3a9d4c30c017f6bb98.tar.gz vis-8ecc5915690112a2ea02ee3a9d4c30c017f6bb98.tar.xz | |
lexers: ruby squiggly heredocs
| -rw-r--r-- | lua/lexers/ruby.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lexers/ruby.lua b/lua/lexers/ruby.lua index dcbed95..ec712c1 100644 --- 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) |
