Explorar el Código

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

Daniel hace 7 meses
padre
commit
483faa93dd
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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 {
 						if "d" != bt.Type {
 							href += "#" + defID
 							href += "#" + defID
 						}
 						}
+						if tree.ID == bt.RootID {
+							href = "#" + defID
+						}
 					}
 					}
 					href = strings.TrimPrefix(href, currentDocDir)
 					href = strings.TrimPrefix(href, currentDocDir)
 					href = util.FilterFilePath(href)
 					href = util.FilterFilePath(href)