🎨 Trim space in dialynote/block ref/new doc save path https://github.com/siyuan-note/siyuan/issues/14482

This commit is contained in:
Daniel 2025-04-01 01:19:39 +08:00
parent 8554804ae2
commit 2a839f9086
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017
2 changed files with 2 additions and 0 deletions

View File

@ -1080,6 +1080,7 @@ func CreateDailyNote(boxID string) (p string, existed bool, err error) {
FlushTxQueue()
hPath = util.TrimSpaceInPath(hPath)
existRoot := treenode.GetBlockTreeRootByHPath(box.ID, hPath)
if nil != existRoot {
existed = true

View File

@ -40,6 +40,7 @@ func createDocsByHPath(boxID, hPath, content, parentID, id string) (retID string
retID = id
hPath = strings.TrimSuffix(hPath, ".sy")
hPath = util.TrimSpaceInPath(hPath)
if "" != parentID {
// The save path is incorrect when creating a sub-doc by ref in a doc with the same name https://github.com/siyuan-note/siyuan/issues/8138
// 在指定了父文档 ID 的情况下优先查找父文档