asciidoc: Add a highlighter for in-word italics as well

This commit is contained in:
Kylie McClain 2020-07-22 23:38:58 -04:00
parent a8f3ff21dd
commit 04721b8425

View File

@ -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