An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve export preview https://github.com/siyuan-note/siyuan/issues/13857
Daniel0658c85b2ea1
diff --git a/kernel/model/conf.go b/kernel/model/conf.goindex 86d76d4ab4..9e40090a33 100644--- a/kernel/model/conf.go+++ b/kernel/model/conf.go@@ -709,7 +709,7 @@ func NewLute() (ret *lute.Lute) {return}-func EnableLuteInlineSyntax(luteEngine *lute.Lute) {+func enableLuteInlineSyntax(luteEngine *lute.Lute) {luteEngine.SetInlineAsterisk(true)luteEngine.SetInlineUnderscore(true)luteEngine.SetSup(true)diff --git a/kernel/model/export.go b/kernel/model/export.goindex edbe0dc7e6..6faf3bed88 100644--- a/kernel/model/export.go+++ b/kernel/model/export.go@@ -576,11 +576,11 @@ func Preview(id string) (retStdHTML string) {tree, _ := LoadTreeByBlockID(id)tree = exportTree(tree, false, false, true,blockRefMode, Conf.Export.BlockEmbedMode, Conf.Export.FileAnnotationRefMode,- Conf.Export.TagOpenMarker, Conf.Export.TagCloseMarker,+ "#", "#", // 这里固定使用 # 包裹标签,否则无法正确解析标签 https://github.com/siyuan-note/siyuan/issues/13857Conf.Export.BlockRefTextLeft, Conf.Export.BlockRefTextRight,Conf.Export.AddTitle, true, true, &map[string]*parse.Tree{})luteEngine := NewLute()- EnableLuteInlineSyntax(luteEngine)+ enableLuteInlineSyntax(luteEngine)luteEngine.SetFootnotes(true)addBlockIALNodes(tree, false)md := treenode.FormatNode(tree.Root, luteEngine)diff --git a/kernel/model/file.go b/kernel/model/file.goindex 2a36e2f411..f73f2e1849 100644--- a/kernel/model/file.go+++ b/kernel/model/file.go@@ -1036,7 +1036,7 @@ func CreateWithMarkdown(tags, boxID, hPath, md, parentID, id string, withMath boluteEngine.SetHTMLTag2TextMark(true)if strings.HasPrefix(clippingHref, "https://ld246.com/article/") || strings.HasPrefix(clippingHref, "https://liuyun.io/article/") {// 改进链滴剪藏 https://github.com/siyuan-note/siyuan/issues/13117- EnableLuteInlineSyntax(luteEngine)+ enableLuteInlineSyntax(luteEngine)}dom := luteEngine.Md2BlockDOM(md, false)retID, err = createDocsByHPath(box.ID, hPath, dom, parentID, id)