mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
🎨 Update av export
This commit is contained in:
parent
c3adbe6b52
commit
10ac5e557d
3 changed files with 27 additions and 16 deletions
|
|
@ -263,11 +263,21 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
for oldAvID, newAvID := range avIDs {
|
||||
newKey := strings.ReplaceAll(k, oldAvID, newAvID)
|
||||
newVal := strings.ReplaceAll(v, oldAvID, newAvID)
|
||||
n.SetIALAttr(newKey, newVal)
|
||||
n.RemoveIALAttr(k)
|
||||
if newKey != k {
|
||||
n.SetIALAttr(newKey, v)
|
||||
n.RemoveIALAttr(k)
|
||||
k = newKey
|
||||
}
|
||||
if newVal != v {
|
||||
n.SetIALAttr(k, newVal)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ast.NodeAttributeView == n.Type {
|
||||
n.AttributeViewID = avIDs[n.AttributeViewID]
|
||||
}
|
||||
return ast.WalkContinue
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue