commit c859fd40b6f5b92cdc544fa6d9a078af4394d602
parent 890e12fc79b351fb576ce3e06b54db5d597537ba
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 20 Apr 2020 13:29:00 +0200
syntax: markdown: do not colorize text between two bold words as italic
Also, do not colorize the text between two stricken-through words,
do not colorize text immediately after an indented piece of code,
but do give color to a double trailing space.
Signed-off-by: Ryan Westlund <rlwestlund@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/syntax/markdown.nanorc b/syntax/markdown.nanorc
@@ -10,20 +10,23 @@ color magenta "^[ ]*>.*"
color brightmagenta "^( | )* ? ? ?(\*|\+|-|[1-9]+\.)( +| )"
# Emphasis and strong:
-color green "\*[^*]+\*|_[^_]+_"
+color green "\*[^* ][^*]*\*|_[^_ ][^_]*_"
color brightgreen "\*\*[^*]+\*\*|__[^_]+__"
# Strikethrough:
-color red "~~.+~~"
+color red "~~[^~]+~~"
+
+# Line breaks:
+color ,blue " $"
# URLs and links:
color brightblue "\[[^]]+\]\([^)]+\)"
color brightmagenta "!?\[[^]]+\]"
-# Code, indented code, and fenced code:
+# Code snippet, indented code, and fenced code:
color brightcyan "`[^`]+`"
-color brightcyan start="^( | )+([^*+0-9> -]|[*+-]\S|[0-9][^.]).*" end="^$"
-color brightcyan start="```" end="```"
+color brightcyan "^( | )+ *([^*+0-9> -]|[*+-]\S|[0-9][^.]).*"
+color brightcyan start="```" end="```$"
# Headings and the underlining of headings:
color brightyellow "^#.*"