🎨 Improve pandoc export

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-12 17:37:58 +08:00
parent cf392b04ae
commit b59c6fda43
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 21 additions and 20 deletions

View file

@ -812,8 +812,9 @@ func ExportDocx(id, savePath string, removeAssets, merge bool) (fullPath string,
pandoc.Stdin = bytes.NewBufferString(content)
output, err := pandoc.CombinedOutput()
if err != nil {
argStr := strings.Join(args, " ")
msg := gulu.DecodeCmdOutput(output)
logging.LogErrorf("export docx failed: %s", msg)
logging.LogErrorf("export docx [%s] failed: %s", argStr, msg)
err = errors.New(fmt.Sprintf(Conf.Language(14), msg))
return
}