Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: 行级元素支持多重样式类型 https://github.com/siyuan-note/siyuan/issues/2911

Liang Ding8ceac926e3be
diff --git a/kernel/treenode/node.go b/kernel/treenode/node.go
index a574ab3e64..c5cf108af6 100644
--- a/kernel/treenode/node.go
+++ b/kernel/treenode/node.go
@@ -114,10 +114,10 @@ func NestedInlines2FlattedSpans(tree *parse.Tree) {
}
if entering {
- span = &ast.Node{Type: ast.NodeTextMark, TextMarkType: strings.Join(tags, " "), TextMarkTextContent: string(n.Tokens)}
+ span = &ast.Node{Type: ast.NodeTextMark, TextMarkType: strings.Join(tags, " "), TextMarkTextContent: string(html.EscapeHTML(n.Tokens))}
if ast.NodeInlineMathContent == n.Type {
span.TextMarkTextContent = ""
- span.TextMarkInlineMathContent = string(n.Tokens)
+ span.TextMarkInlineMathContent = string(html.EscapeHTML(n.Tokens))
}
if ast.NodeLinkText == n.Type && !n.ParentIs(ast.NodeImage) {
var link *ast.Node