mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-02 21:51:49 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
d7e5ade487
commit
0be193eee6
1 changed files with 11 additions and 0 deletions
|
|
@ -796,6 +796,17 @@ func ExportDocx(id, savePath string, removeAssets, merge bool) (fullPath string,
|
|||
args = append(args, "--lua-filter", util.PandocColorFilterPath)
|
||||
}
|
||||
|
||||
hasReferenceDoc := false
|
||||
for i := 0; i < len(args)-1; i++ {
|
||||
if "--reference-doc" == args[i] {
|
||||
hasReferenceDoc = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !hasReferenceDoc {
|
||||
args = append(args, "--reference-doc", util.PandocTemplatePath)
|
||||
}
|
||||
|
||||
pandoc := exec.Command(Conf.Export.PandocBin, args...)
|
||||
gulu.CmdAttr(pandoc)
|
||||
pandoc.Stdin = bytes.NewBufferString(content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue