mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 20:08:49 +01:00
🎨 Database values no longer correspond to block attributes Fix https://github.com/siyuan-note/siyuan/issues/9293
This commit is contained in:
parent
ad53100fd1
commit
c1bc0c2b0e
3 changed files with 12 additions and 16 deletions
|
|
@ -153,10 +153,8 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
|
||||
// 重新指向数据库属性值
|
||||
ial := parse.IAL2Map(n.KramdownIAL)
|
||||
for k, v := range ial {
|
||||
if strings.HasPrefix(k, NodeAttrNamePrefixAvKey) {
|
||||
v = strings.ReplaceAll(v, oldNodeID, newNodeID)
|
||||
n.SetIALAttr(k, v)
|
||||
for k, _ := range ial {
|
||||
if strings.HasPrefix(k, NodeAttrNameAvs) {
|
||||
avBlockIDs[oldNodeID] = newNodeID
|
||||
}
|
||||
}
|
||||
|
|
@ -259,7 +257,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
|
||||
ial := parse.IAL2Map(n.KramdownIAL)
|
||||
for k, v := range ial {
|
||||
if strings.HasPrefix(k, NodeAttrNamePrefixAvKey) || strings.HasPrefix(k, NodeAttrNameAvs) {
|
||||
if strings.HasPrefix(k, NodeAttrNameAvs) {
|
||||
newKey, newVal := k, v
|
||||
for oldAvID, newAvID := range avIDs {
|
||||
newKey = strings.ReplaceAll(newKey, oldAvID, newAvID)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue