asciidoc.kak: use a more tolerant block regex for

Get rid of the nasty backreference we were relying on.
This commit is contained in:
Maxime Coste 2017-10-09 12:35:28 +08:00
parent 591ddb86e3
commit d09924d24b

View File

@ -18,7 +18,10 @@ add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n-{2,}\h*$ 0:header
add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n~{2,}\h*$ 0:header
add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n\^{2,}\h*$ 0:header
add-highlighter -group /asciidoc regex ^\h+([-\*])\h+[^\n]*(\n\h+[^-\*]\S+[^\n]*)*$ 0:list 1:bullet
add-highlighter -group /asciidoc regex ^([-=~]+)\n[^\n\h].*?\n\1$ 0:block
add-highlighter -group /asciidoc regex ^(-{3,})\n[^\n\h].*?\n(-{3,})$ 0:block
add-highlighter -group /asciidoc regex ^(={3,})\n[^\n\h].*?\n(={3,})$ 0:block
add-highlighter -group /asciidoc regex ^(~{3,})\n[^\n\h].*?\n(~{3,})$ 0:block
add-highlighter -group /asciidoc regex ^(\*{3,})\n[^\n\h].*?\n(\*{3,})$ 0:block
add-highlighter -group /asciidoc regex \B(?:\+[^\n]+?\+|`[^\n]+?`)\B 0:mono
add-highlighter -group /asciidoc regex \B_[^\n]+?_\B 0:italic
add-highlighter -group /asciidoc regex \B\*[^\n]+?\*\B 0:bold