aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2017-06-16 14:07:10 -0400
committerZackaryWelch <welch.zackary@gmail.com>2017-06-16 14:07:32 -0400
commitff88b18285ce9724c8f3091f2fb9d8bde4f8bb75 (patch)
tree615c0941074c61c1f3bcc6433cd1f88583d03d05
parentMinor debugging change in lumina-fm (diff)
downloadlumina-ff88b18285ce9724c8f3091f2fb9d8bde4f8bb75.tar.gz
lumina-ff88b18285ce9724c8f3091f2fb9d8bde4f8bb75.tar.bz2
lumina-ff88b18285ce9724c8f3091f2fb9d8bde4f8bb75.zip
Updated Markdown syntax
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax14
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/tests/test.md10
2 files changed, 16 insertions, 8 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax
index 294c2c68..89146c62 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax
@@ -22,38 +22,38 @@
},
{
"name": "bold",
- "regex" : "[\\*]{2}[^\\*]+[\\*]{2}",
+ "regex" : "[\\*]{2}[^\\*\\_\\s]+[\\*]{2}",
"foreground": "colors/altkeyword",
"font_weight" : "bold"
},
{
"name": "italic",
- "regex" : "[\\*]{1}[^\\*]+[\\*]{1}",
+ "regex" : "[\\*]{1}[^\\*\\_\\s]+[\\*]{1}",
"foreground": "colors/altkeyword",
"font_style" : "italic"
},
{
"name": "bold and italic",
- "regex" : "[\\*]{3}[^\\*]+[\\*]{3}",
+ "regex" : "[\\*]{3}[^\\s]*[^\\*\\_]+[^\\s]*[\\*]{3}",
"foreground": "colors/altkeyword",
"font_weight" : "bold",
"font_style" : "italic"
},
{
"name": "bold",
- "regex" : "[_]{2}[^\\*]+[_]{2}",
+ "regex" : "[_]{2}[^\\*\\_\\s]+[_]{2}",
"foreground": "colors/altkeyword",
"font_weight" : "bold"
},
{
"name": "italic",
- "regex" : "[_]{1}[^\\*]+[_]{1}",
+ "regex" : "[_]{1}[^\\*\\_\\s]+[_]{1}",
"foreground": "colors/altkeyword",
"font_style" : "italic"
},
{
"name": "bold and italic",
- "regex" : "[_]{3}[^\\*]+[_]{3}",
+ "regex" : "[_]{3}[^\\s]*[^\\*\\_]+[^\\s]*[_]{3}",
"foreground": "colors/altkeyword",
"font_weight" : "bold",
"font_style" : "italic"
@@ -70,7 +70,7 @@
},
{
"name" : "horizontal rule",
- "regex": "^((\\-[\\s]?\\-[\\s]?\\-[\\s]?)|(\\*\\*\\*))$",
+ "regex": "^((\\-\\s*\\-\\s*\\-\\s*)|(\\*\\s*\\*\\s*\\*)|(\\_\\s*\\_\\s*\\_\\s*))$",
"foreground" : "colors/function"
},
{
diff --git a/src-qt5/desktop-utils/lumina-textedit/tests/test.md b/src-qt5/desktop-utils/lumina-textedit/tests/test.md
index f9e963c6..fc6bc78b 100644
--- a/src-qt5/desktop-utils/lumina-textedit/tests/test.md
+++ b/src-qt5/desktop-utils/lumina-textedit/tests/test.md
@@ -8,9 +8,13 @@
*Italic*
**Bold**
-
***Bold and Italic***
+***a***
+_Italic_
+__Bold__
+___Bold and Italic___
+___a___
[link](link)
Some [link](link) within a text block.
@@ -20,6 +24,10 @@ Some [text](link) within a text block with another [Link](Link) in it.
Horizontal Rules
---
***
+___
+* * *
+_ _ _
+* * *
some `in-line code block` test in `a line`.
bgstack15