From d09924d24b429cb3aba7c4904610fa0d17e9114f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 9 Oct 2017 12:35:28 +0800 Subject: [PATCH] asciidoc.kak: use a more tolerant block regex for Get rid of the nasty backreference we were relying on. --- rc/core/asciidoc.kak | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rc/core/asciidoc.kak b/rc/core/asciidoc.kak index 727be794..fa9111b4 100644 --- a/rc/core/asciidoc.kak +++ b/rc/core/asciidoc.kak @@ -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