瀏覽代碼

:art: Improve exporting Markdown https://github.com/siyuan-note/siyuan/issues/13273

Daniel 7 月之前
父節點
當前提交
483faa93dd
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      kernel/model/export.go

+ 3 - 0
kernel/model/export.go

@@ -1985,6 +1985,9 @@ func exportMarkdownContent0(tree *parse.Tree, cloudAssetsBase string, assetsDest
 						if "d" != bt.Type {
 							href += "#" + defID
 						}
+						if tree.ID == bt.RootID {
+							href = "#" + defID
+						}
 					}
 					href = strings.TrimPrefix(href, currentDocDir)
 					href = util.FilterFilePath(href)