Dot_Files/.config/nano/syntax/markdown.nanorc
Price Hiller f7568438ef [ Nano ] Added nano dot files and relevant syntax files
In the horrible scenario in which neovim or vim are not available on a
system I use (and yeah, I found one recently wtf), nano is a simple
alternative that gets the job done... these files are for my comfort IN
nano but not optimal. 😞
2022-01-21 05:34:52 -06:00

52 lines
1.1 KiB
Plaintext

syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
# Tables (Github extension)
color cyan ".*[ :]\|[ :].*"
# quotes
color brightblack start="^>" end="^$"
color brightblack "^>.*"
# Emphasis
color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
# Strong emphasis
color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
# strike-through
color red "(^|[[:space:]])~~[^ ][^~]*~~"
# horizontal rules
color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$"
# headlines
color brightmagenta "^#{1,6}.*"
# lists
color blue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
# leading whitespace
color black "^[[:space:]]+"
# misc
color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
# links
color brightblue "\[[^]]+\]"
color brightblue "\[([^][]|\[[^]]*\])*\]\([^)]+\)"
# images
color magenta "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
# urls
color brightyellow "https?://[^ )>]+"
# code
color yellow "`[^`]*`|^ {4}[^-+*].*"
# code blocks
color yellow start="^```[^$]" end="^```$"
color yellow "^```$"
## Trailing spaces
color ,green "[[:space:]]+$"