Merge pull request #89 from ThomasR/patch-2

Improve markdown.nanorc
This commit is contained in:
Anthony Scopatz 2016-02-28 12:03:27 -05:00
commit 09236699e7

View File

@ -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 "^```$"