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

This commit is contained in:
Daniel 2023-08-12 14:05:48 +08:00
parent 0635af2fc5
commit b64ef60261
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 4 additions and 1 deletions

View file

@ -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..."

View file

@ -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