mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-14 11:14:21 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
cf3a40e494
6 changed files with 53 additions and 32 deletions
|
|
@ -52,6 +52,11 @@ remote.initialize();
|
|||
app.setPath("userData", app.getPath("userData") + "-Electron"); // `~/.config` 下 Electron 相关文件夹名称改为 `SiYuan-Electron` https://github.com/siyuan-note/siyuan/issues/3349
|
||||
fs.rmSync(app.getPath("appData") + "/" + app.name, {recursive: true}); // 删除自动创建的应用目录 https://github.com/siyuan-note/siyuan/issues/13150
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
// Windows 需要设置 AppUserModelId 才能正确显示应用名称 https://github.com/siyuan-note/siyuan/issues/17022
|
||||
app.setAppUserModelId(app.name);
|
||||
}
|
||||
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
app.quit();
|
||||
return;
|
||||
|
|
|
|||
28
app/stage/protyle/js/lute/lute.min.js
vendored
28
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -8,7 +8,7 @@ require (
|
|||
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
|
||||
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
|
||||
github.com/88250/gulu v1.2.3-0.20260124101918-98654a7ca98a
|
||||
github.com/88250/lute v1.7.7-0.20260211030654-949c7835fc4f
|
||||
github.com/88250/lute v1.7.7-0.20260212074925-2a3399ad0426
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
|
||||
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
|
||||
github.com/ConradIrwin/font v0.2.1
|
||||
|
|
@ -118,6 +118,7 @@ require (
|
|||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 // indirect
|
||||
github.com/aws/smithy-go v1.24.0 // indirect
|
||||
github.com/aymerick/douceur v0.2.0 // indirect
|
||||
github.com/bytedance/gopkg v0.1.3 // indirect
|
||||
github.com/bytedance/sonic v1.14.1 // indirect
|
||||
github.com/bytedance/sonic/loader v0.3.0 // indirect
|
||||
|
|
@ -159,6 +160,7 @@ require (
|
|||
github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.19 // indirect
|
||||
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
|
|||
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/88250/gulu v1.2.3-0.20260124101918-98654a7ca98a h1:s86WMolaqommXG1k2vXg9Gf1iXvgtHSdeD0eeJTQVR8=
|
||||
github.com/88250/gulu v1.2.3-0.20260124101918-98654a7ca98a/go.mod h1:D+Db16m0N7r9MLZCMcj1a0ZsEGQAxDZkadOn79Gh0vI=
|
||||
github.com/88250/lute v1.7.7-0.20260211030654-949c7835fc4f h1:pVhWNJJsTRk1H8rzZ+yPJFG+maALsn8xcpCPne+VN7A=
|
||||
github.com/88250/lute v1.7.7-0.20260211030654-949c7835fc4f/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
|
||||
github.com/88250/lute v1.7.7-0.20260212074925-2a3399ad0426 h1:4GbKmP4HH8tDQmdJvAWlJd25otZURM9jwwR3LECf9tk=
|
||||
github.com/88250/lute v1.7.7-0.20260212074925-2a3399ad0426/go.mod h1:Mi2qNqGPzMcYhrcCZwTzU1tUCEm9oUJ/W8QQMROx/ks=
|
||||
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46 h1:Bq1JsDfVbHKUxNL/B2JXd8cC/1h6aFjrlXpGycnh0Hk=
|
||||
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
|
||||
|
|
@ -94,6 +94,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 h1:5fFjR/ToSOzB2OQ/XqWpZBmNvmP/
|
|||
github.com/aws/aws-sdk-go-v2/service/sts v1.41.6/go.mod h1:qgFDZQSD/Kys7nJnVqYlWKnh0SSdMjAi0uSwON4wgYQ=
|
||||
github.com/aws/smithy-go v1.24.0 h1:LpilSUItNPFr1eY85RYgTIg5eIEPtvFbskaFcmmIUnk=
|
||||
github.com/aws/smithy-go v1.24.0/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
|
||||
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
||||
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
||||
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
|
||||
github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM=
|
||||
github.com/bytedance/sonic v1.14.1 h1:FBMC0zVz5XUmE4z9wF4Jey0An5FueFvOsTKKKtwIl7w=
|
||||
|
|
@ -299,6 +301,8 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
|
|||
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
|
||||
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
|
||||
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
|
||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||
github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc=
|
||||
|
|
|
|||
|
|
@ -812,8 +812,9 @@ func ExportDocx(id, savePath string, removeAssets, merge bool) (fullPath string,
|
|||
pandoc.Stdin = bytes.NewBufferString(content)
|
||||
output, err := pandoc.CombinedOutput()
|
||||
if err != nil {
|
||||
argStr := strings.Join(args, " ")
|
||||
msg := gulu.DecodeCmdOutput(output)
|
||||
logging.LogErrorf("export docx failed: %s", msg)
|
||||
logging.LogErrorf("export docx [%s] failed: %s", argStr, msg)
|
||||
err = errors.New(fmt.Sprintf(Conf.Language(14), msg))
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,24 +111,7 @@ func InitPandoc() {
|
|||
return
|
||||
}
|
||||
|
||||
tempPandocDir := filepath.Join(TempDir, "pandoc")
|
||||
|
||||
if confPath := filepath.Join(ConfDir, "conf.json"); gulu.File.IsExist(confPath) {
|
||||
// Workspace built-in Pandoc is no longer initialized after customizing Pandoc path https://github.com/siyuan-note/siyuan/issues/8377
|
||||
if data, err := os.ReadFile(confPath); err == nil {
|
||||
conf := map[string]interface{}{}
|
||||
if err = gulu.JSON.UnmarshalJSON(data, &conf); err == nil && nil != conf["export"] {
|
||||
export := conf["export"].(map[string]interface{})
|
||||
if customPandocBinPath := export["pandocBin"].(string); !strings.HasPrefix(customPandocBinPath, tempPandocDir) {
|
||||
if pandocVer := getPandocVer(customPandocBinPath); "" != pandocVer {
|
||||
PandocBinPath = customPandocBinPath
|
||||
logging.LogInfof("custom pandoc [ver=%s, bin=%s]", pandocVer, PandocBinPath)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
defer eventbus.Publish(EvtConfPandocInitialized)
|
||||
|
||||
PandocTemplatePath = filepath.Join(WorkingDir, "pandoc-resources", "pandoc-template.docx")
|
||||
if !gulu.File.IsExist(PandocTemplatePath) {
|
||||
|
|
@ -148,7 +131,23 @@ func InitPandoc() {
|
|||
logging.LogWarnf("pandoc color filter file [%s] not found", PandocColorFilterPath)
|
||||
}
|
||||
|
||||
defer eventbus.Publish(EvtConfPandocInitialized)
|
||||
tempPandocDir := filepath.Join(TempDir, "pandoc")
|
||||
if confPath := filepath.Join(ConfDir, "conf.json"); gulu.File.IsExist(confPath) {
|
||||
// Workspace built-in Pandoc is no longer initialized after customizing Pandoc path https://github.com/siyuan-note/siyuan/issues/8377
|
||||
if data, err := os.ReadFile(confPath); err == nil {
|
||||
conf := map[string]interface{}{}
|
||||
if err = gulu.JSON.UnmarshalJSON(data, &conf); err == nil && nil != conf["export"] {
|
||||
export := conf["export"].(map[string]interface{})
|
||||
if customPandocBinPath := export["pandocBin"].(string); !strings.HasPrefix(customPandocBinPath, tempPandocDir) {
|
||||
if pandocVer := getPandocVer(customPandocBinPath); "" != pandocVer {
|
||||
PandocBinPath = customPandocBinPath
|
||||
logging.LogInfof("custom pandoc [ver=%s, bin=%s]", pandocVer, PandocBinPath)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if gulu.OS.IsWindows() {
|
||||
if "amd64" == runtime.GOARCH {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue