mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
♻️ 移除旧版中的行级元素实现代码 https://github.com/siyuan-note/siyuan/issues/6819
This commit is contained in:
parent
c69983c56c
commit
637f1427e4
11 changed files with 24 additions and 322 deletions
|
|
@ -656,21 +656,10 @@ func GetContainerText(container *ast.Node) string {
|
|||
return ast.WalkContinue
|
||||
}
|
||||
switch n.Type {
|
||||
case ast.NodeText, ast.NodeLinkText, ast.NodeFileAnnotationRefText, ast.NodeFootnotesRef,
|
||||
ast.NodeCodeBlockCode, ast.NodeMathBlockContent:
|
||||
case ast.NodeText, ast.NodeLinkText, ast.NodeCodeBlockCode, ast.NodeMathBlockContent:
|
||||
buf.Write(n.Tokens)
|
||||
case ast.NodeTextMark:
|
||||
buf.WriteString(n.Content())
|
||||
case ast.NodeBlockRef:
|
||||
if anchor := n.ChildByType(ast.NodeBlockRefText); nil != anchor {
|
||||
buf.WriteString(anchor.Text())
|
||||
} else if anchor = n.ChildByType(ast.NodeBlockRefDynamicText); nil != anchor {
|
||||
buf.WriteString(anchor.Text())
|
||||
} else {
|
||||
text := GetRefText(n.TokensStr())
|
||||
buf.WriteString(text)
|
||||
}
|
||||
return ast.WalkSkipChildren
|
||||
}
|
||||
return ast.WalkContinue
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue