🎨 Support disabling ==foo== inline mark syntax https://github.com/siyuan-note/siyuan/issues/13868

This commit is contained in:
Daniel 2025-02-13 15:45:50 +08:00
parent 4521665274
commit ae9531577a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
19 changed files with 55 additions and 4 deletions

View file

@ -33,6 +33,7 @@ var MarkdownSettings = &Markdown{
InlineTag: true,
InlineMath: true,
InlineStrikethrough: true,
InlineMark: true,
}
type Markdown struct {
@ -43,6 +44,7 @@ type Markdown struct {
InlineTag bool `json:"inlineTag"` // 是否启用行级标签
InlineMath bool `json:"inlineMath"` // 是否启用行级公式
InlineStrikethrough bool `json:"inlineStrikethrough"` // 是否启用行级删除线
InlineMark bool `json:"inlineMark"` // 是否启用行级标记
}
func NewLute() (ret *lute.Lute) {
@ -64,6 +66,7 @@ func NewLute() (ret *lute.Lute) {
ret.SetTag(MarkdownSettings.InlineTag)
ret.SetInlineMath(MarkdownSettings.InlineMath)
ret.SetGFMStrikethrough(MarkdownSettings.InlineStrikethrough)
ret.SetMark(MarkdownSettings.InlineMark)
ret.SetInlineMathAllowDigitAfterOpenMarker(true)
ret.SetGFMStrikethrough1(false)
ret.SetFootnotes(false)