🐛 Non-desktop ends cannot export Markdown https://github.com/siyuan-note/siyuan/issues/11953
This commit is contained in:
parent
5921ab900d
commit
1a881e35f7
1 changed files with 5 additions and 5 deletions
|
@ -58,11 +58,6 @@ func ConvertPandoc(dir string, args ...string) (path string, err error) {
|
|||
}
|
||||
|
||||
func Pandoc(from, to, o, content string) (err error) {
|
||||
if "" == PandocBinPath || ContainerStd != Container {
|
||||
err = ErrPandocNotFound
|
||||
return
|
||||
}
|
||||
|
||||
if "" == from || "" == to || "md" == to {
|
||||
if err = gulu.File.WriteFileSafer(o, []byte(content), 0644); nil != err {
|
||||
logging.LogErrorf("write export markdown file [%s] failed: %s", o, err)
|
||||
|
@ -70,6 +65,11 @@ func Pandoc(from, to, o, content string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
if "" == PandocBinPath || ContainerStd != Container {
|
||||
err = ErrPandocNotFound
|
||||
return
|
||||
}
|
||||
|
||||
dir := filepath.Join(WorkspaceDir, "temp", "convert", "pandoc", gulu.Rand.String(7))
|
||||
if err = os.MkdirAll(dir, 0755); nil != err {
|
||||
logging.LogErrorf("mkdir [%s] failed: [%s]", dir, err)
|
||||
|
|
Loading…
Add table
Reference in a new issue