aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua
diff options
context:
space:
mode:
authormitchell <unknown>2018-06-16 21:28:43 -0400
committermitchell <unknown>2018-06-16 21:28:43 -0400
commit0ec088ea2def1bae5c51b82d0683ebb0406da083 (patch)
tree670ea3d07cf0b96e12c48a9d0e48d03259962758 /lexlua
parent74e858b28883719396861be81827023a656ccb9b (diff)
downloadscintilla-mirror-0ec088ea2def1bae5c51b82d0683ebb0406da083.tar.gz
Fixed incorrect highlighting of indented markdown lists.
They were being identified as blockcode.
Diffstat (limited to 'lexlua')
-rw-r--r--lexlua/markdown.lua10
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)