From 04721b8425c27d8763945adf864feb7aea75e7e3 Mon Sep 17 00:00:00 2001 From: Kylie McClain Date: Wed, 22 Jul 2020 23:38:58 -0400 Subject: [PATCH] asciidoc: Add a highlighter for in-word italics as well --- rc/filetype/asciidoc.kak | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rc/filetype/asciidoc.kak b/rc/filetype/asciidoc.kak index fa5c2e65..890810f3 100644 --- a/rc/filetype/asciidoc.kak +++ b/rc/filetype/asciidoc.kak @@ -52,17 +52,17 @@ add-highlighter shared/asciidoc/ regex ^(\*{3,})\n[^\n\h].*?\n(\*{3,})$ 0:block # Monospaced text add-highlighter shared/asciidoc/ regex \B(?:\+[^\n]+?\+|`[^\n]+?`)\B 0:mono -# Italics -add-highlighter shared/asciidoc/ regex \b_[^\n]+?_\b 0:+i - # Bolded text add-highlighter shared/asciidoc/ regex \s\*[^\n\*]+\*\B 0:+b add-highlighter shared/asciidoc/ regex \h\*[^\n\*]+\*\B 0:+b - -# Bolded text that transcends word boundaries -add-highlighter shared/asciidoc/ regex ^\*{2}(?!\h)[^\n\*]+\*{2} 0:+b +add-highlighter shared/asciidoc/ regex \*{2}(?!\h)[^\n\*]+\*{2} 0:+b add-highlighter shared/asciidoc/ regex \h\*{2}[^\n\*]+\*{2} 0:+b +# Italicized text +# (these are simpler since they aren't able to _also_ be bullet characters.) +add-highlighter shared/asciidoc/ regex \b_[^\n]+?_\b 0:+i +add-highlighter shared/asciidoc/ regex __[^\n]+?__ 0:+i + # Attributes add-highlighter shared/asciidoc/ regex ^:[-\w]+: 0:meta add-highlighter shared/asciidoc/ regex [^\\](\{[-\w]+\})[^\\]? 1:meta