Skip to content

Commit

Permalink
Merge pull request scopatz#89 from ThomasR/patch-2
Browse files Browse the repository at this point in the history
Improve markdown.nanorc
  • Loading branch information
scopatz committed Feb 28, 2016
2 parents 82e7008 + ed2fa75 commit 0923669
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions markdown.nanorc
Original file line number Diff line number Diff line change
@@ -1,17 +1,47 @@
syntax "markdown" "\.(md|mkd|mkdn|markdown)$"

# Tables (Github extension)
color cyan ".*[ :]\|[ :].*"

# quotes
color brightblack "^>.*"

# Emphasis
color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"

# Strong emphasis
color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"

color brightmagenta "^=====*$|^-----*$|^#{1,6}.*"
# 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:]]+"
color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($$)"
color brightyellow "\!?\[[^]]*\]([[:space:]]*\[[^]]*\]|\(.*\))?"
color brightyellow "^\[.*\]:[[:space:]]*[^"]*"
color yellow "`[^`]*`|^ {4}[^-+*].*"
color brightblack "^>.*"

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

0 comments on commit 0923669

Please sign in to comment.