🎨 重复剪藏相同的页面后创建的文档不跟随机数 Fix https://github.com/siyuan-note/siyuan/issues/6851

This commit is contained in:
Liang Ding 2022-12-11 17:48:29 +08:00
parent c2d1686164
commit 81527c7b7c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -24,7 +24,6 @@ import (
"sort"
"strings"
"github.com/88250/gulu"
"github.com/88250/lute/ast"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/search"
@ -35,9 +34,6 @@ import (
func createDocsByHPath(boxID, hPath, content string) (id string, existed bool, err error) {
hPath = strings.TrimSuffix(hPath, ".sy")
if existed = nil != treenode.GetBlockTreeRootByHPath(boxID, hPath); existed {
hPath += "-" + gulu.Rand.String(7)
}
pathBuilder := bytes.Buffer{}
pathBuilder.WriteString("/")
hPathBuilder := bytes.Buffer{}