Ver Fonte

PegParser: support TABLE style

Le Tan há 7 anos atrás
pai
commit
313a8647a8

+ 5 - 1
src/pegmarkdownhighlighter.cpp

@@ -21,7 +21,11 @@ PegMarkdownHighlighter::PegMarkdownHighlighter(QTextDocument *p_doc, VMdEditor *
       m_timeStamp(0),
       m_codeBlockTimeStamp(0),
       m_parser(NULL),
-      m_parserExts(pmh_EXT_NOTES | pmh_EXT_STRIKE | pmh_EXT_FRONTMATTER | pmh_EXT_MARK),
+      m_parserExts(pmh_EXT_NOTES
+                   | pmh_EXT_STRIKE
+                   | pmh_EXT_FRONTMATTER
+                   | pmh_EXT_MARK
+                   | pmh_EXT_TABLE),
       m_parseInterval(50),
       m_notifyHighlightComplete(false),
       m_fastParseInterval(30)

+ 7 - 0
src/resources/themes/v_detorte/v_detorte.mdhl

@@ -204,3 +204,10 @@ font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
 MARK
 foreground: dadada
 background: 802090
+
+TABLE
+font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
+
+TABLEBORDER
+foreground: e37c84
+background: 4e4e4e

+ 1 - 1
src/resources/themes/v_detorte/v_detorte.palette

@@ -9,7 +9,7 @@ mdhl_file=v_detorte.mdhl
 css_file=v_detorte.css
 codeblock_css_file=v_detorte_codeblock.css
 mermaid_css_file=v_detorte_mermaid.css
-version=12
+version=13
 
 ; This mapping will be used to translate colors when the content of HTML is copied
 ; without background. You could just specify the foreground colors mapping here.

+ 7 - 0
src/resources/themes/v_moonlight/v_moonlight.mdhl

@@ -203,3 +203,10 @@ font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
 MARK
 foreground: abb2bf
 background: 551560
+
+TABLE
+font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
+
+TABLEBORDER
+foreground: e06c75
+background: 393f4a

+ 1 - 1
src/resources/themes/v_moonlight/v_moonlight.palette

@@ -7,7 +7,7 @@ mdhl_file=v_moonlight.mdhl
 css_file=v_moonlight.css
 codeblock_css_file=v_moonlight_codeblock.css
 mermaid_css_file=v_moonlight_mermaid.css
-version=23
+version=24
 
 ; This mapping will be used to translate colors when the content of HTML is copied
 ; without background. You could just specify the foreground colors mapping here.

+ 7 - 0
src/resources/themes/v_native/v_native.mdhl

@@ -199,3 +199,10 @@ font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
 MARK
 foreground: 363636
 background: ffff76
+
+TABLE
+font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
+
+TABLEBORDER
+foreground: d33682
+background: eeeeee

+ 1 - 1
src/resources/themes/v_native/v_native.palette

@@ -7,7 +7,7 @@ mdhl_file=v_native.mdhl
 css_file=v_native.css
 codeblock_css_file=v_native_codeblock.css
 mermaid_css_file=v_native_mermaid.css
-version=21
+version=22
 
 [phony]
 ; Abstract color attributes.

+ 7 - 0
src/resources/themes/v_pure/v_pure.mdhl

@@ -200,3 +200,10 @@ font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
 MARK
 foreground: 222222
 background: ffff76
+
+TABLE
+font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
+
+TABLEBORDER
+foreground: d33682
+background: e0e0e0

+ 1 - 1
src/resources/themes/v_pure/v_pure.palette

@@ -7,7 +7,7 @@ mdhl_file=v_pure.mdhl
 css_file=v_pure.css
 codeblock_css_file=v_pure_codeblock.css
 mermaid_css_file=v_pure_mermaid.css
-version=23
+version=24
 
 [phony]
 ; Abstract color attributes.