ソースを参照

:art: Heading convert to doc does not use naming as doc name https://github.com/siyuan-note/siyuan/issues/8959

Daniel 1 年間 前
コミット
b64ef60261
2 ファイル変更4 行追加1 行削除
  1. 3 0
      kernel/model/blockinfo.go
  2. 1 1
      kernel/model/heading.go

+ 3 - 0
kernel/model/blockinfo.go

@@ -134,7 +134,10 @@ func getNodeRefText(node *ast.Node) string {
 		ret = util.EscapeHTML(ret)
 		return ret
 	}
+	return getNodeRefText0(node)
+}
 
+func getNodeRefText0(node *ast.Node) string {
 	switch node.Type {
 	case ast.NodeBlockQueryEmbed:
 		return "Query Embed Block..."

+ 1 - 1
kernel/model/heading.go

@@ -272,7 +272,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
 	}
 
 	box := Conf.Box(targetBoxID)
-	headingText := getNodeRefText(headingNode)
+	headingText := getNodeRefText0(headingNode)
 	headingText = util.FilterFileName(headingText)
 
 	moveToRoot := "/" == targetPath