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: Repeat the escaped content of the image title https://github.com/siyuan-note/siyuan/issues/11681
Daniel334f693d5d43
diff --git a/kernel/go.mod b/kernel/go.modindex e847bdb50f..bf2f2bfce8 100644--- a/kernel/go.mod+++ b/kernel/go.mod@@ -8,7 +8,7 @@ require (github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7github.com/88250/gulu v1.2.3-0.20240505150113-bc43bd50f866- github.com/88250/lute v1.7.7-0.20240607091414-8a2485a51a44+ github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720cgithub.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4diff --git a/kernel/go.sum b/kernel/go.sumindex d756bc0148..a01a71076c 100644--- a/kernel/go.sum+++ b/kernel/go.sum@@ -12,8 +12,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceTgithub.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=github.com/88250/gulu v1.2.3-0.20240505150113-bc43bd50f866 h1:RFfNFS0hv6TbOuwET6xZAfGlV4hNlXiWTnfbLN1eF6k=github.com/88250/gulu v1.2.3-0.20240505150113-bc43bd50f866/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=-github.com/88250/lute v1.7.7-0.20240607091414-8a2485a51a44 h1:8Vyd280GzTSO2+1KS7j8Ww0iYW/qF4rVkow4/YxSRO4=-github.com/88250/lute v1.7.7-0.20240607091414-8a2485a51a44/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=+github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568 h1:1TwBQATNCmPi4XvEZReYDam8aouz3DZPXUciciTITdg=+github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=diff --git a/kernel/model/box.go b/kernel/model/box.goindex fa56aa5679..3e5e100f44 100644--- a/kernel/model/box.go+++ b/kernel/model/box.go@@ -429,11 +429,11 @@ func (box *Box) moveTrees0(files []*FileInfo) {func parseKTree(kramdown []byte) (ret *parse.Tree) {luteEngine := NewLute()ret = parse.Parse("", kramdown, luteEngine.ParseOptions)- genTreeID(ret)+ normalizeTree(ret)return}-func genTreeID(tree *parse.Tree) {+func normalizeTree(tree *parse.Tree) {if nil == tree.Root.FirstChild {tree.Root.AppendChild(treenode.NewParagraph())}@@ -494,6 +494,11 @@ func genTreeID(tree *parse.Tree) {n.InsertBefore(n.FirstChild)}+ if ast.NodeLinkTitle == n.Type {+ // 避免重复转义图片标题内容 Repeat the escaped content of the image title https://github.com/siyuan-note/siyuan/issues/11681+ n.Tokens = html.UnescapeBytes(n.Tokens)+ }+return ast.WalkContinue})tree.Root.KramdownIAL = parse.Tokens2IAL(tree.Root.LastChild.Tokens)diff --git a/kernel/model/import.go b/kernel/model/import.goindex 6d09ed4ad6..332d707df8 100644--- a/kernel/model/import.go+++ b/kernel/model/import.go@@ -966,7 +966,7 @@ func parseStdMd(markdown []byte) (ret *parse.Tree) {if nil == ret {return}- genTreeID(ret)+ normalizeTree(ret)imgHtmlBlock2InlineImg(ret)parse.NestedInlines2FlattedSpansHybrid(ret, false)return