aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-01-31 15:30:27 +0100
committerMarc André Tanner <mat@brain-dump.org>2020-01-31 15:30:27 +0100
commit352404dc442896029b01a0da6f9b29e39ec5c53c (patch)
treee43d6260d44a900a2cc1f15ff8c1481d468f8730 /lua
parente72197685ba442fb9fa0fb658fe68d22a3ba7156 (diff)
downloadvis-352404dc442896029b01a0da6f9b29e39ec5c53c.tar.gz
vis-352404dc442896029b01a0da6f9b29e39ec5c53c.tar.xz
lexers: fix crash in rst lexer
Fix #665
Diffstat (limited to 'lua')
-rw-r--r--lua/lexers/rest.lua2
1 files changed, 1 insertions, 1 deletions
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.