From d3ecc9f31112b5df2007d79dcb51cb50f42d7d8d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 25 Jan 2017 00:24:41 +0000 Subject: [PATCH] More tolerant recognition of underlined titles in asciidoc highlight --- rc/core/asciidoc.kak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rc/core/asciidoc.kak b/rc/core/asciidoc.kak index 89413334..4605c65f 100644 --- a/rc/core/asciidoc.kak +++ b/rc/core/asciidoc.kak @@ -13,10 +13,10 @@ hook global BufCreate .+\.(a(scii)?doc|asc) %{ add-highlighter -group / group asciidoc -add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n={2,}\h*\n\h*$ 0:title -add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n-{2,}\h*\n\h*$ 0:header -add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n~{2,}\h*\n\h*$ 0:header -add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n\^{2,}\h*\n\h*$ 0:header +add-highlighter -group /asciidoc regex (\A|\n\n)[^\n]+\n={2,}\h*$ 0:title +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 (?