mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
🐛 Fix pandoc export
This commit is contained in:
parent
ca01112462
commit
b2c0f3ea1f
3 changed files with 18 additions and 17 deletions
|
|
@ -2071,18 +2071,11 @@ func exportPandocConvertZip(boxID, baseFolderName string, docPaths []string,
|
|||
}
|
||||
|
||||
// 调用 Pandoc 进行格式转换
|
||||
output, err := util.Pandoc(pandocFrom, pandocTo, writePath, md)
|
||||
err := util.Pandoc(pandocFrom, pandocTo, writePath, md)
|
||||
if nil != err {
|
||||
logging.LogErrorf("pandoc failed: %s", err)
|
||||
continue
|
||||
}
|
||||
|
||||
if "odt" != pandocTo && "epub" != pandocTo && "rtf" != pandocTo {
|
||||
if err := gulu.File.WriteFileSafer(writePath, gulu.Str.ToBytes(output), 0644); nil != err {
|
||||
logging.LogErrorf("write export markdown file [%s] failed: %s", writePath, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
zipPath = exportFolder + ".zip"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue