From 352404dc442896029b01a0da6f9b29e39ec5c53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 31 Jan 2020 15:30:27 +0100 Subject: lexers: fix crash in rst lexer Fix #665 --- lua/lexers/rest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lexers/rest.lua') diff --git a/lua/lexers/rest.lua b/lua/lexers/rest.lua index 5a968dc..be5b839 100644 --- 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. -- cgit v1.2.3