diff options
author | mitchell <unknown> | 2018-06-16 21:28:43 -0400 |
---|---|---|
committer | mitchell <unknown> | 2018-06-16 21:28:43 -0400 |
commit | 0ec088ea2def1bae5c51b82d0683ebb0406da083 (patch) | |
tree | 670ea3d07cf0b96e12c48a9d0e48d03259962758 | |
parent | 74e858b28883719396861be81827023a656ccb9b (diff) | |
download | scintilla-mirror-0ec088ea2def1bae5c51b82d0683ebb0406da083.tar.gz |
Fixed incorrect highlighting of indented markdown lists.
They were being identified as blockcode.
-rw-r--r-- | lexlua/markdown.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lexlua/markdown.lua b/lexlua/markdown.lua index 2622a11d7..eb1327c75 100644 --- a/lexlua/markdown.lua +++ b/lexlua/markdown.lua @@ -33,6 +33,11 @@ lex:add_rule('blockquote', return (e or #input) + 1 end))) +lex:add_rule('list', token('list', lexer.starts_line(S(' \t')^0 * (S('*+-') + + R('09')^1 * '.')) * + S(' \t'))) +lex:add_style('list', lexer.STYLE_CONSTANT) + lex:add_rule('blockcode', token('code', lexer.starts_line(P(' ')^4 + P('\t')) * -P('<') * lexer.nonnewline^0 * lexer.newline^-1)) @@ -51,11 +56,6 @@ lex:add_rule('hr', end))) lex:add_style('hr', 'back:$(color.black),eolfilled') -lex:add_rule('list', token('list', lexer.starts_line(S(' \t')^0 * (S('*+-') + - R('09')^1 * '.')) * - S(' \t'))) -lex:add_style('list', lexer.STYLE_CONSTANT) - -- Whitespace. local ws = token(lexer.WHITESPACE, S(' \t')^1 + S('\v\r\n')^1) lex:add_rule('whitespace', ws) |