mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
♻️ 移除旧版中的行级元素实现代码 https://github.com/siyuan-note/siyuan/issues/6819
This commit is contained in:
parent
bc850b331a
commit
c69983c56c
8 changed files with 20 additions and 51 deletions
|
|
@ -892,15 +892,10 @@ func (tx *Transaction) doUpdate(operation *Operation) (ret *TxErr) {
|
|||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
if ast.NodeInlineMath == n.Type {
|
||||
content := n.ChildByType(ast.NodeInlineMathContent)
|
||||
if nil == content || 1 > len(content.Tokens) {
|
||||
// 剔除空白的行级公式
|
||||
unlinks = append(unlinks, n)
|
||||
}
|
||||
} else if ast.NodeTextMark == n.Type {
|
||||
if ast.NodeTextMark == n.Type {
|
||||
if n.IsTextMarkType("inline-math") {
|
||||
if "" == strings.TrimSpace(n.TextMarkInlineMathContent) {
|
||||
// 剔除空白的行级公式
|
||||
unlinks = append(unlinks, n)
|
||||
}
|
||||
} else if n.IsTextMarkType("block-ref") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue