vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 07b68c75cb40770efb1de5219cea38dd7498235b parent aa26e59b167a9314d387b27cb73565495c3c915b Author: Silas <silas@nocafe.net> Date: Mon, 11 Mar 2019 11:15:23 -0300 Heredoc delimiter should end with a newline Or else the following: <<EOF .... EOFXYZ parsers incorrectly. Diffstat:
| M | lua/lexers/bash.lua | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/lexers/bash.lua b/lua/lexers/bash.lua @@ -21,7 +21,7 @@ local heredoc = '<<' * P(function(input, index) local s, e, _, delimiter = input:find('%-?(["\']?)([%a_][%w_]*)%1[\n\r\f;]+', index) if s == index and delimiter then - local _, e = input:find('[\n\r\f]+'..delimiter, e) + local _, e = input:find('[\n\r\f]+'..delimiter..'\n', e) return e and e + 1 or #input + 1 end end)