🐛 Flashcard management will be incorrectly highlighted after global search https://github.com/siyuan-note/siyuan/issues/13898

This commit is contained in:
Daniel
2025-03-12 23:25:07 +08:00
parent cea5821c0b
commit c5136f28f1
+4
View File
@@ -17,6 +17,7 @@
package sql
import (
"strings"
"time"
"github.com/88250/lute/ast"
@@ -25,6 +26,7 @@ import (
"github.com/jinzhu/copier"
gcache "github.com/patrickmn/go-cache"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/search"
)
var cacheDisabled = true
@@ -57,6 +59,8 @@ func putBlockCache(block *Block) {
logging.LogErrorf("clone block failed: %v", err)
return
}
cloned.Content = strings.ReplaceAll(cloned.Content, search.SearchMarkLeft, "")
cloned.Content = strings.ReplaceAll(cloned.Content, search.SearchMarkRight, "")
blockCache.Set(cloned.ID, cloned, 1)
}