✨ 行级元素支持多重样式类型 https://github.com/siyuan-note/siyuan/issues/2911
This commit is contained in:
parent
02d9245bcf
commit
e2e929538b
1 changed files with 10 additions and 5 deletions
|
@ -124,12 +124,17 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
if !entering {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
if ast.NodeBlockRefID == n.Type {
|
||||
newDefID := blockIDs[n.TokensStr()]
|
||||
if treenode.IsBlockRef(n) {
|
||||
defID, _, _ := treenode.GetBlockRef(n)
|
||||
newDefID := blockIDs[defID]
|
||||
if "" != newDefID {
|
||||
n.Tokens = []byte(newDefID)
|
||||
} else {
|
||||
logging.LogWarnf("not found def [" + n.TokensStr() + "]")
|
||||
if ast.NodeBlockRef == n.Type {
|
||||
if id := n.ChildByType(ast.NodeBlockRefID); nil != id {
|
||||
id.Tokens = []byte(newDefID)
|
||||
}
|
||||
} else {
|
||||
n.TextMarkBlockRefID = newDefID
|
||||
}
|
||||
}
|
||||
} else if ast.NodeBlockQueryEmbedScript == n.Type {
|
||||
for oldID, newID := range blockIDs {
|
||||
|
|
Loading…
Add table
Reference in a new issue