vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 5119a7ff3c1e97d4e10e27518d937bdcdf8cd005
parent 72744cde0434379ebba795a717f4a5124c985b77
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 31 Jan 2020 15:30:27 +0100

lexers: fix crash in rst lexer

Fix #665

Diffstat:
Mlua/lexers/rest.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lua/lexers/rest.lua b/lua/lexers/rest.lua @@ -28,7 +28,7 @@ local overline = lpeg.Cmt(starts_line(adornment), function(input, index, adm, c) return #input + 1 end) local underline = lpeg.Cmt(starts_line(adornment), function(_, index, adm, c) - local pos = adm:match('^%'..c..'+()%s*$') + local pos = adm:match('^%'..c..'+%s*()$') return pos and index - #adm + pos - 1 or nil end) -- Token needs to be a predefined one in order for folder to work.