From fca47bae6c601d584444d8c29b070d3f42d904ab Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 16 Jun 2022 19:51:31 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E9=87=8D=E5=91=BD=E5=90=8D=E4=B9=A6?= =?UTF-8?q?=E7=AD=BE=E5=90=8E=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=B9=A6=E7=AD=BE=E5=B1=9E=E6=80=A7=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=20Fix=20https://github.com/siyuan-note/siyua?= =?UTF-8?q?n/issues/5207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/bookmark.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/model/bookmark.go b/kernel/model/bookmark.go index 012945a53..5dd1ac861 100644 --- a/kernel/model/bookmark.go +++ b/kernel/model/bookmark.go @@ -22,6 +22,8 @@ import ( "sort" "strings" + "github.com/88250/lute/parse" + "github.com/siyuan-note/siyuan/kernel/cache" "github.com/siyuan-note/siyuan/kernel/sql" "github.com/siyuan-note/siyuan/kernel/treenode" "github.com/siyuan-note/siyuan/kernel/util" @@ -56,6 +58,7 @@ func RemoveBookmark(bookmark string) (err error) { if bookmarkAttrVal := node.IALAttr("bookmark"); bookmarkAttrVal == bookmark { node.RemoveIALAttr("bookmark") + cache.PutBlockIAL(node.ID, parse.IAL2Map(node.KramdownIAL)) } } @@ -115,6 +118,7 @@ func RenameBookmark(oldBookmark, newBookmark string) (err error) { if bookmarkAttrVal := node.IALAttr("bookmark"); bookmarkAttrVal == oldBookmark { node.SetIALAttr("bookmark", newBookmark) + cache.PutBlockIAL(node.ID, parse.IAL2Map(node.KramdownIAL)) } }