2020-04-10 09:59:12 +00:00
|
|
|
## Syntax highlighting for Markdown files.
|
|
|
|
|
2020-09-15 12:54:52 +00:00
|
|
|
## Original authors: Ryan Westlund and Benno Schulenberg
|
|
|
|
## License: GPL version 3 or newer
|
|
|
|
|
2020-04-10 09:59:12 +00:00
|
|
|
syntax markdown "\.md$"
|
|
|
|
comment "<!--|-->"
|
|
|
|
|
|
|
|
# Quoted:
|
|
|
|
color magenta "^[ ]*>.*"
|
|
|
|
|
|
|
|
# List-item markers:
|
|
|
|
color brightmagenta "^( | )* ? ? ?(\*|\+|-|[1-9]+\.)( +| )"
|
|
|
|
|
|
|
|
# Emphasis and strong:
|
2020-04-20 11:29:00 +00:00
|
|
|
color green "\*[^* ][^*]*\*|_[^_ ][^_]*_"
|
2020-04-10 09:59:12 +00:00
|
|
|
color brightgreen "\*\*[^*]+\*\*|__[^_]+__"
|
|
|
|
|
|
|
|
# Strikethrough:
|
2020-04-20 11:29:00 +00:00
|
|
|
color red "~~[^~]+~~"
|
|
|
|
|
|
|
|
# Line breaks:
|
|
|
|
color ,blue " $"
|
2020-04-10 09:59:12 +00:00
|
|
|
|
|
|
|
# URLs and links:
|
|
|
|
color brightblue "\[[^]]+\]\([^)]+\)"
|
|
|
|
color brightmagenta "!?\[[^]]+\]"
|
|
|
|
|
2020-04-20 11:29:00 +00:00
|
|
|
# Code snippet, indented code, and fenced code:
|
2020-04-10 09:59:12 +00:00
|
|
|
color brightcyan "`[^`]+`"
|
2020-04-20 11:29:00 +00:00
|
|
|
color brightcyan "^( | )+ *([^*+0-9> -]|[*+-]\S|[0-9][^.]).*"
|
|
|
|
color brightcyan start="```" end="```$"
|
2020-04-10 09:59:12 +00:00
|
|
|
|
|
|
|
# Headings and the underlining of headings:
|
|
|
|
color brightyellow "^#.*"
|
|
|
|
color brightyellow "^(=+|-+)$"
|
|
|
|
|
|
|
|
# HTML tags and comments:
|
|
|
|
color cyan "<[^>]+>"
|
|
|
|
color cyan start="<!--" end="-->"
|