Skip to content

Commit 2f6c7fa

Browse files
committed
🎨 Follow editor Markdown syntax settings when importing Markdown #14731
1 parent e0f8a2f commit 2f6c7fa

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

kernel/util/lute.go

+10-7
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,16 @@ func NewStdLute() (ret *lute.Lute) {
9797
ret.SetGFMAutoLink(false) // 导入 Markdown 时不自动转换超链接 https://github.com/siyuan-note/siyuan/issues/7682
9898
ret.SetImgPathAllowSpace(true)
9999
ret.SetInlineMathAllowDigitAfterOpenMarker(true) // Formula parsing supports $ followed by numbers when importing Markdown https://github.com/siyuan-note/siyuan/issues/8362
100-
ret.SetInlineAsterisk(true)
101-
ret.SetInlineUnderscore(true)
102-
ret.SetSup(true)
103-
ret.SetSub(true)
104-
ret.SetTag(true)
105-
ret.SetInlineMath(true)
106-
ret.SetGFMStrikethrough(true)
100+
101+
// 导入 Markdown 时遵循编辑器 Markdown 语法设置
102+
// Follow editor Markdown syntax settings when importing Markdown https://github.com/siyuan-note/siyuan/issues/14731
103+
ret.SetInlineAsterisk(MarkdownSettings.InlineAsterisk)
104+
ret.SetInlineUnderscore(MarkdownSettings.InlineUnderscore)
105+
ret.SetSup(MarkdownSettings.InlineSup)
106+
ret.SetSub(MarkdownSettings.InlineSub)
107+
ret.SetTag(MarkdownSettings.InlineTag)
108+
ret.SetInlineMath(MarkdownSettings.InlineMath)
109+
ret.SetGFMStrikethrough(MarkdownSettings.InlineStrikethrough)
107110
ret.SetGFMStrikethrough1(false)
108111
return
109112
}

0 commit comments

Comments
 (0)