asciidoc: Add comments for clarity
This commit is contained in:
parent
7274092955
commit
41532cd3e0
|
@ -25,29 +25,45 @@ provide-module asciidoc %{
|
||||||
|
|
||||||
add-highlighter shared/asciidoc group
|
add-highlighter shared/asciidoc group
|
||||||
|
|
||||||
|
# Titles and headers (multi-line style)
|
||||||
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n={2,}\h*$ 0:title
|
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n={2,}\h*$ 0:title
|
||||||
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n-{2,}\h*$ 0:header
|
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n-{2,}\h*$ 0:header
|
||||||
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n~{2,}\h*$ 0:header
|
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n~{2,}\h*$ 0:header
|
||||||
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n\^{2,}\h*$ 0:header
|
add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n\^{2,}\h*$ 0:header
|
||||||
|
|
||||||
|
# Titles and headerss (one-line style)
|
||||||
add-highlighter shared/asciidoc/ regex (\A|\n\n)=\h+[^\n]+$ 0:title
|
add-highlighter shared/asciidoc/ regex (\A|\n\n)=\h+[^\n]+$ 0:title
|
||||||
add-highlighter shared/asciidoc/ regex (\A|\n\n)={2,}\h+[^\n]+$ 0:header
|
add-highlighter shared/asciidoc/ regex (\A|\n\n)={2,}\h+[^\n]+$ 0:header
|
||||||
|
|
||||||
|
# Comments
|
||||||
add-highlighter shared/asciidoc/ regex ^//(?:[^\n/][^\n]*|)$ 0:comment
|
add-highlighter shared/asciidoc/ regex ^//(?:[^\n/][^\n]*|)$ 0:comment
|
||||||
add-highlighter shared/asciidoc/ regex ^(/{4,}).*?\n(/{4,})$ 0:comment
|
add-highlighter shared/asciidoc/ regex ^(/{4,}).*?\n(/{4,})$ 0:comment
|
||||||
|
|
||||||
|
# Bulleted lists
|
||||||
add-highlighter shared/asciidoc/ regex ^\h*(?<bullet>[-\*])\h+[^\n]+$ 0:list bullet:bullet
|
add-highlighter shared/asciidoc/ regex ^\h*(?<bullet>[-\*])\h+[^\n]+$ 0:list bullet:bullet
|
||||||
add-highlighter shared/asciidoc/ regex ^\h*(?<bullet>[-\*]+)\h+[^\n]+(\n\h+[^-\*\n]*)?$ 0:list bullet:bullet
|
add-highlighter shared/asciidoc/ regex ^\h*(?<bullet>[-\*]+)\h+[^\n]+(\n\h+[^-\*\n]*)?$ 0:list bullet:bullet
|
||||||
|
|
||||||
|
# Blocks
|
||||||
add-highlighter shared/asciidoc/ regex ^(-{3,})\n[^\n\h].*?\n(-{3,})$ 0:block
|
add-highlighter shared/asciidoc/ regex ^(-{3,})\n[^\n\h].*?\n(-{3,})$ 0:block
|
||||||
add-highlighter shared/asciidoc/ regex ^(={3,})\n[^\n\h].*?\n(={3,})$ 0:block
|
add-highlighter shared/asciidoc/ regex ^(={3,})\n[^\n\h].*?\n(={3,})$ 0:block
|
||||||
add-highlighter shared/asciidoc/ regex ^(~{3,})\n[^\n\h].*?\n(~{3,})$ 0:block
|
add-highlighter shared/asciidoc/ regex ^(~{3,})\n[^\n\h].*?\n(~{3,})$ 0:block
|
||||||
add-highlighter shared/asciidoc/ regex ^(\*{3,})\n[^\n\h].*?\n(\*{3,})$ 0:block
|
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
|
add-highlighter shared/asciidoc/ regex \B(?:\+[^\n]+?\+|`[^\n]+?`)\B 0:mono
|
||||||
|
|
||||||
|
# Italics
|
||||||
add-highlighter shared/asciidoc/ regex \b_[^\n]+?_\b 0:+i
|
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 \s\*[^\n\*]+\*\B 0:+b
|
||||||
add-highlighter shared/asciidoc/ regex \h\*[^\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
|
add-highlighter shared/asciidoc/ regex \h\*{2}[^\n\*]+\*{2} 0:+b
|
||||||
|
|
||||||
|
# Attributes
|
||||||
add-highlighter shared/asciidoc/ regex ^:[-\w]+: 0:meta
|
add-highlighter shared/asciidoc/ regex ^:[-\w]+: 0:meta
|
||||||
|
|
||||||
# Commands
|
# Commands
|
||||||
|
|
Loading…
Reference in New Issue
Block a user