vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 785dd2eb7c0aff1d233653e3a6dcda35b589f837 parent bbabcc7404dd259b3470a53d7363b40dfa19a619 Author: Marc André Tanner <mat@brain-dump.org> Date: Tue, 28 Apr 2020 14:30:24 +0200 lexers: make markdown white space rule less greedy This should give the code block rule a chance to actually match something, whereas before all leading white space was already consumed. Fix #823 Diffstat:
| M | lua/lexers/markdown.lua | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/lexers/markdown.lua b/lua/lexers/markdown.lua @@ -8,7 +8,7 @@ local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'markdown'} -- Whitespace. -local ws = token(l.WHITESPACE, l.space^1) +local ws = token(l.WHITESPACE, S(' \t')^1 + S('\v\r\n')^1) -- Block elements. local header = token('h6', l.starts_line('######') * l.nonnewline^0) +