mirror of
https://github.com/scopatz/nanorc
synced 2024-11-27 12:25:53 +01:00
Improve markdown.nanorc
support for tables, strike-through, horizontal rules; better image highlighting
This commit is contained in:
parent
82e70080bf
commit
ed2fa75484
|
@ -1,17 +1,47 @@
|
||||||
syntax "markdown" "\.(md|mkd|mkdn|markdown)$"
|
syntax "markdown" "\.(md|mkd|mkdn|markdown)$"
|
||||||
|
|
||||||
|
# Tables (Github extension)
|
||||||
|
color cyan ".*[ :]\|[ :].*"
|
||||||
|
|
||||||
|
# quotes
|
||||||
|
color brightblack "^>.*"
|
||||||
|
|
||||||
# Emphasis
|
# Emphasis
|
||||||
color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
|
color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
|
||||||
|
|
||||||
# Strong emphasis
|
# Strong emphasis
|
||||||
color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
|
color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
|
||||||
|
|
||||||
color brightmagenta "^=====*$|^-----*$|^#{1,6}.*"
|
# strike-through
|
||||||
color blue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
|
color red "(^|[[:space:]])~~[^ ][^~]*~~"
|
||||||
color black "^[[:space:]]+"
|
|
||||||
color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($$)"
|
|
||||||
color brightyellow "\!?\[[^]]*\]([[:space:]]*\[[^]]*\]|\(.*\))?"
|
|
||||||
color brightyellow "^\[.*\]:[[:space:]]*[^"]*"
|
|
||||||
color yellow "`[^`]*`|^ {4}[^-+*].*"
|
|
||||||
color brightblack "^>.*"
|
|
||||||
|
|
||||||
|
# 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 "^```$"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user