Skip to content

Commit

Permalink
🐛 Non-desktop ends cannot export Markdown #11953
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jul 13, 2024
1 parent 7673acf commit 457f941
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kernel/util/pandoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ 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)
}
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)
Expand Down

0 comments on commit 457f941

Please sign in to comment.