🎨 The heading block convert doc block to preserve symbols as much as possible https://github.com/siyuan-note/siyuan/issues/11126

This commit is contained in:
Daniel 2024-04-24 21:18:15 +08:00
parent 3b17b1ccfd
commit d432982f15
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 14 additions and 6 deletions

View file

@ -287,7 +287,10 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
box := Conf.Box(targetBoxID)
headingText := getNodeRefText0(headingNode)
headingText = util.FilterFileName(headingText)
if strings.Contains(headingText, "/") {
headingText = strings.ReplaceAll(headingText, "/", "_")
util.PushMsg(Conf.language(246), 7000)
}
moveToRoot := "/" == targetPath
toHP := path.Join("/", headingText)