aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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)