🎨 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

@ -1479,6 +1479,7 @@
"242": "The binding block already exists in the current database",
"243": "Only list the first [%d] tags (including subtags), if you need to adjust, please modify [Settings - Doc Tree - Maximum number to list]",
"244": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]",
"245": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. To exit normally, you need to use [Exit Application] in the right panel"
"245": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. To exit normally, you need to use [Exit Application] in the right panel",
"246": "The document title cannot contain / and has been replaced with _"
}
}

View file

@ -1479,6 +1479,7 @@
"242": "El bloque de enlace ya existe en la base de datos actual",
"243": "Enumere solo las primeras [%d] etiquetas (incluidas las subetiquetas), modifique [Configuración - Árbol de documentos - Número máximo a listar]",
"244": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]",
"245": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. Para salir normalmente, necesita usar [Salir de la aplicación] en el panel derecho"
"245": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. Para salir normalmente, necesita usar [Salir de la aplicación] en el panel derecho",
"246": "El título del documento no puede contener / y ha sido reemplazado por _"
}
}

View file

@ -1479,6 +1479,7 @@
"242": "Le bloc de liaison existe déjà dans la base de données actuelle",
"243": "Répertorier uniquement les [%d] premières balises (y compris les sous-balises). veuillez modifier [Paramètres - Arbre des documents - Nombre maximum de documents à lister].",
"244": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Rebuild Index]",
"245": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Rebuild Index]. Pour quitter normalement, vous devez utiliser [Quitter l'application] dans le panneau de droite"
"245": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Rebuild Index]. Pour quitter normalement, vous devez utiliser [Quitter l'application] dans le panneau de droite",
"246": "Le titre du document ne peut pas contenir / et a été remplacé par _"
}
}

View file

@ -1479,6 +1479,7 @@
"242": "目前資料庫中已經存在該綁定區塊",
"243": "僅列出前 [%d] 個標籤(含子標籤),如需調整請修改 [設置 - 文檔樹 - 最大列出數量]",
"244": "上次使用後未正常退出,建議執行一次 [文檔樹 - 重建索引]",
"245": "上次使用後未正常退出,建議執行一次 [文件樹 - 重建索引],正常退出需使用右側欄面板中的 [退出應用]"
"245": "上次使用後未正常退出,建議執行一次 [文件樹 - 重建索引],正常退出需使用右側欄面板中的 [退出應用]",
"246": "文件標題不能包含 /,已經使用 _ 替換"
}
}

View file

@ -1479,6 +1479,7 @@
"242": "当前数据库中已经存在该绑定块",
"243": "仅列出前 [%d] 个标签(含子标签),如需调整请修改 [设置 - 文档树 - 最大列出数量]",
"244": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引]",
"245": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引],正常退出需使用右侧栏面板中的 [退出应用]"
"245": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引],正常退出需使用右侧栏面板中的 [退出应用]",
"246": "文档标题不能包含 /,已经使用 _ 替换"
}
}

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)