diff options
Diffstat (limited to 'lexlua/markdown.lua')
-rw-r--r-- | lexlua/markdown.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlua/markdown.lua b/lexlua/markdown.lua index eb1327c75..cc56327c6 100644 --- a/lexlua/markdown.lua +++ b/lexlua/markdown.lua @@ -47,12 +47,12 @@ lex:add_rule('hr', token('hr', lpeg.Cmt(lexer.starts_line(S(' \t')^0 * lpeg.C(S('*-_'))), function(input, index, c) - local line = input:match('[^\n]*', index) + local line = input:match('[^\r\n]*', index) line = line:gsub('[ \t]', '') if line:find('[^'..c..']') or #line < 2 then return nil end - return (input:find('\n', index) or #input) + 1 + return (input:find('\r?\n', index) or #input) + 1 end))) lex:add_style('hr', 'back:$(color.black),eolfilled') |