mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
highlighter: support Front Matter for YAML meta data
This commit is contained in:
parent
5b681dd64c
commit
a305b6872e
@ -818,7 +818,8 @@ void HGMarkdownHighlighter::parseInternal()
|
|||||||
memcpy(content, data, len);
|
memcpy(content, data, len);
|
||||||
content[len] = '\0';
|
content[len] = '\0';
|
||||||
|
|
||||||
pmh_markdown_to_elements(content, pmh_EXT_STRIKE, &result);
|
int exts = pmh_EXT_STRIKE | pmh_EXT_FRONTMATTER;
|
||||||
|
pmh_markdown_to_elements(content, exts, &result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HGMarkdownHighlighter::handleContentChange(int /* position */, int charsRemoved, int charsAdded)
|
void HGMarkdownHighlighter::handleContentChange(int /* position */, int charsRemoved, int charsAdded)
|
||||||
|
@ -177,3 +177,6 @@ foreground: ccb24c
|
|||||||
STRIKE
|
STRIKE
|
||||||
foreground: e57373
|
foreground: e57373
|
||||||
font-style: strikeout
|
font-style: strikeout
|
||||||
|
|
||||||
|
FRONTMATTER
|
||||||
|
foreground: af8787
|
||||||
|
@ -176,3 +176,6 @@ foreground: 6e7686
|
|||||||
STRIKE
|
STRIKE
|
||||||
foreground: e57373
|
foreground: e57373
|
||||||
font-style: strikeout
|
font-style: strikeout
|
||||||
|
|
||||||
|
FRONTMATTER
|
||||||
|
foreground: 6e7686
|
||||||
|
@ -172,3 +172,6 @@ foreground: 00af00
|
|||||||
STRIKE
|
STRIKE
|
||||||
foreground: b71c1c
|
foreground: b71c1c
|
||||||
font-style: strikeout
|
font-style: strikeout
|
||||||
|
|
||||||
|
FRONTMATTER
|
||||||
|
foreground: 6c6c6c
|
||||||
|
@ -173,3 +173,6 @@ foreground: 00af00
|
|||||||
STRIKE
|
STRIKE
|
||||||
foreground: b71c1c
|
foreground: b71c1c
|
||||||
font-style: strikeout
|
font-style: strikeout
|
||||||
|
|
||||||
|
FRONTMATTER
|
||||||
|
foreground: 6c6c6c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user