mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 After the document is transferred to the heading, occurs two copies of the reference block Fix https://github.com/siyuan-note/siyuan/issues/7819
This commit is contained in:
parent
c804ce77fc
commit
ee7ab26fcd
3 changed files with 31 additions and 1 deletions
|
|
@ -47,3 +47,13 @@ func upsertRefs(tx *sql.Tx, tree *parse.Tree) (err error) {
|
|||
err = insertRefs(tx, tree)
|
||||
return
|
||||
}
|
||||
|
||||
func deleteRefs(tx *sql.Tx, tree *parse.Tree) (err error) {
|
||||
if err = deleteRefsByPath(tx, tree.Box, tree.Path); nil != err {
|
||||
return
|
||||
}
|
||||
if err = deleteFileAnnotationRefsByPath(tx, tree.Box, tree.Path); nil != err {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue