🎨 Improve exporting Word

This commit is contained in:
Daniel 2024-12-21 17:52:31 +08:00
parent b5bfbbe14a
commit 811636d051
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -610,6 +610,7 @@ func ExportDocx(id, savePath string, removeAssets, merge bool) (fullPath string,
}
defer os.Remove(tmpDir)
name, content := ExportMarkdownHTML(id, tmpDir, true, merge)
content = strings.ReplaceAll(content, " \n", "<br>\n")
tmpDocxPath := filepath.Join(tmpDir, name+".docx")
args := []string{ // pandoc -f html --resource-path=请从这里开始 请从这里开始\index.html -o test.docx