🎨 导出 Markdown 时在文档头添加 YFM 开关 https://github.com/siyuan-note/siyuan/issues/7727

This commit is contained in:
Liang Ding 2023-03-23 15:08:55 +08:00
parent 6fc4ba4298
commit f552dc44df
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -1077,7 +1077,6 @@ func exportMarkdownZip(boxID, baseFolderName string, docPaths []string) (zipPath
id := docIAL["id"]
hPath, md := exportMarkdownContent(id)
md = yfm(docIAL) + md
dir, name = path.Split(hPath)
dir = util.FilterFilePath(dir) // 导出文档时未移除不支持的文件名符号 https://github.com/siyuan-note/siyuan/issues/4590
name = util.FilterFileName(name)
@ -1441,6 +1440,8 @@ func exportMarkdownContent(id string) (hPath, exportedMd string) {
Conf.Export.TagOpenMarker, Conf.Export.TagCloseMarker,
Conf.Export.BlockRefTextLeft, Conf.Export.BlockRefTextRight,
Conf.Export.AddTitle)
docIAL := parse.IAL2Map(tree.Root.KramdownIAL)
exportedMd = yfm(docIAL) + exportedMd
return
}