From 25dafd55fed15d8e447e9382e6c529fcfcb5aef6 Mon Sep 17 00:00:00 2001 From: Kylie McClain Date: Thu, 23 Jul 2020 01:18:31 -0400 Subject: [PATCH] asciidoc: Add a highlighters for links --- rc/filetype/asciidoc.kak | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rc/filetype/asciidoc.kak b/rc/filetype/asciidoc.kak index acb6eb6f..4ec92b3b 100644 --- a/rc/filetype/asciidoc.kak +++ b/rc/filetype/asciidoc.kak @@ -77,6 +77,12 @@ add-highlighter shared/asciidoc/ regex ^\[[^\n]+\]$ 0:operator add-highlighter shared/asciidoc/ regex ^(NOTE|TIP|IMPORTANT|CAUTION|WARNING): 0:block add-highlighter shared/asciidoc/ regex ^\[(NOTE|TIP|IMPORTANT|CAUTION|WARNING)\]$ 0:block +# Links, inline macros +add-highlighter shared/asciidoc/ regex \b((?:https?|ftp|irc://)[^\h\[]+)\[([^\n]*)?\] 1:link 2:+i +add-highlighter shared/asciidoc/ regex (link|mailto):([^\n]+)(?:\[([^\n]*)\]) 1:keyword 2:link 3:+i +add-highlighter shared/asciidoc/ regex (xref):([^\n]+)(?:\[([^\n]*)\]) 1:keyword 2:meta 3:+i +add-highlighter shared/asciidoc/ regex (<<([^\n><]+)>>) 1:link 2:meta + # Commands # ‾‾‾‾‾‾‾‾