mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Support for exporting ODT Fix https://github.com/siyuan-note/siyuan/issues/8133
This commit is contained in:
parent
a52cf1eb29
commit
847be4b939
5 changed files with 40 additions and 5 deletions
|
|
@ -26,7 +26,7 @@ import (
|
|||
"github.com/siyuan-note/logging"
|
||||
)
|
||||
|
||||
func Pandoc(from, to, content string) (ret string, err error) {
|
||||
func Pandoc(from, to, o, content string) (ret string, err error) {
|
||||
if "" == from || "" == to || "md" == to {
|
||||
ret = content
|
||||
return
|
||||
|
|
@ -37,6 +37,10 @@ func Pandoc(from, to, content string) (ret string, err error) {
|
|||
"--to", to,
|
||||
}
|
||||
|
||||
if "" != o {
|
||||
args = append(args, "-o", o)
|
||||
}
|
||||
|
||||
pandoc := exec.Command(PandocBinPath, args...)
|
||||
gulu.CmdAttr(pandoc)
|
||||
pandoc.Stdin = bytes.NewBufferString(content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue