smol/syntax/markdown.nanorc

35 lines
807 B
Plaintext

## Syntax highlighting for Markdown files.
syntax markdown "\.md$"
comment "<!--|-->"
# Quoted:
color magenta "^[ ]*>.*"
# List-item markers:
color brightmagenta "^( | )* ? ? ?(\*|\+|-|[1-9]+\.)( +| )"
# Emphasis and strong:
color green "\*[^*]+\*|_[^_]+_"
color brightgreen "\*\*[^*]+\*\*|__[^_]+__"
# Strikethrough:
color red "~~.+~~"
# URLs and links:
color brightblue "\[[^]]+\]\([^)]+\)"
color brightmagenta "!?\[[^]]+\]"
# Code, indented code, and fenced code:
color brightcyan "`[^`]+`"
color brightcyan start="^( | )+([^*+0-9> -]|[*+-]\S|[0-9][^.]).*" end="^$"
color brightcyan start="```" end="```"
# Headings and the underlining of headings:
color brightyellow "^#.*"
color brightyellow "^(=+|-+)$"
# HTML tags and comments:
color cyan "<[^>]+>"
color cyan start="<!--" end="-->"