Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/serialhex/nano-highlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbendmorris <ben@bendmorris.com>2013-05-29 22:39:08 +0400
committerbendmorris <ben@bendmorris.com>2013-05-29 22:39:08 +0400
commit4d06d4173d7e235def981b557a39e9983d55c9a7 (patch)
tree7611abaec0beebdf1bdae774c7d1f91ca49ba183
parent1ff60ea43a993a21a474aadabaf84cf417d9d0bf (diff)
Updating markdown syntax highlighting.
-rw-r--r--markdown.nanorc22
1 files changed, 10 insertions, 12 deletions
diff --git a/markdown.nanorc b/markdown.nanorc
index 69938fc..76c143b 100644
--- a/markdown.nanorc
+++ b/markdown.nanorc
@@ -5,11 +5,11 @@ syntax "markdown" "\.txt$" "\.text$" "\.md$" "\.markdown$"
# Quotations
color cyan "^>.*"
# Emphasis
-color green "_.*_"
-color green "\*.*\*"
+color green "_[^_]*_"
+color green "\*[^\*]*\*"
# Strong emphasis
-color brightgreen "\*\*.*\*\*"
-color brightgreen "__.*__"
+color brightgreen "\*\*[^\*]*\*\*"
+color brightgreen "__[\_]*__"
# Underline headers
color brightblue "^====(=*)"
color brightblue "^----(-*)"
@@ -18,17 +18,15 @@ color brightblue "^#.*"
# Linkified URLs (and inline html tags)
color brightmagenta start="<" end=">"
# Links
-color brightmagenta "\[.*\]\(.*\)"
-# Reference-style links
-color brightmagenta "\[.*\]( )?\[.*\]"
+color brightmagenta "\[.*\](\([^\)]*\))?"
# Link id's:
color brightmagenta "^\[.*\]:( )+.*"
# Code spans
color brightyellow "`.*`"
# Code blocks
-color brightyellow "^( ).*"
-# Inline images
-color brightmagenta "!\[.*\]\(.*\)"
-# Reference-style images
-color brightmagenta "!\[.*\]\[.*\]"
+# disabled, because indented lines aren't always code blocks
+# color brightyellow "^( ).*"
+# Links and inline images
+color brightmagenta start="!\[" end="\]"
+color brightmagenta start="\[" end="\]"