🎨 桌面端内置 Pandoc 可执行文件 https://github.com/siyuan-note/siyuan/issues/5835

This commit is contained in:
Liang Ding 2022-09-07 10:30:25 +08:00
parent ffa53aa4f1
commit d134045a60
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
13 changed files with 91 additions and 19 deletions

View file

@ -20,7 +20,6 @@ import (
"bytes"
"net"
"os"
"os/exec"
"path"
"strings"
@ -135,17 +134,3 @@ func TimeFromID(id string) (ret string) {
ret = id[:14]
return
}
func IsValidPandocBin(binPath string) bool {
if "" == binPath {
return false
}
cmd := exec.Command(binPath, "--version")
CmdAttr(cmd)
data, err := cmd.CombinedOutput()
if nil == err && strings.HasPrefix(string(data), "pandoc") {
return true
}
return false
}