markdown.nanorc (1318B)
1 # Slightly modified version of: 2 # https://github.com/galenguyer/nano-syntax-highlighting 3 4 syntax "Markdown" "\.(md|mkd|mkdn|markdown|mdx|mdown)$" 5 6 # Tables (Github extension) 7 color blue ".*[ :]\|[ :].*" 8 9 # quotes 10 color magenta start="^>" end="^$" 11 color magenta "^>.*" 12 13 # Emphasis 14 color magenta "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)" 15 16 # Strong emphasis 17 color brightblue "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)" 18 19 # strike-through 20 color brightred "(^|[[:space:]])~~[^ ][^~]*~~" 21 22 # horizontal rules 23 color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$" 24 25 # headlines 26 color brightred "^# .*" 27 color brightyellow "^## .*" 28 color brightgreen "^### .*" 29 color brightcyan "^#### .*" 30 color brightmagenta "^##### .*" 31 color brightblue "^###### .*" 32 33 # lists 34 color brightyellow "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " 35 36 # leading whitespace 37 color black "^[[:space:]]+" 38 39 # misc 40 color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])" 41 42 # links 43 color yellow "\[[^]]+\]" 44 color yellow "\[([^][]|\[[^]]*\])*\]\([^)]+\)" 45 46 # images 47 color red "!\[[^][]*\](\([^)]+\)|\[[^]]+\])" 48 49 # urls 50 color brightyellow "https?://[^ )>]+" 51 52 # code 53 color blue "`[^`]*`|^ {4}[^-+*].*" 54 # code blocks 55 color blue start="^```[^$]" end="^```$" 56 color blue "^```$" 57 58 ## Trailing spaces 59 color ,blue "[[:space:]]+$"