Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2025-06-19 11:01:52 +08:00
commit ff5875f7d7
5 changed files with 36 additions and 14 deletions

View file

@ -14,10 +14,10 @@ Install pnpm: `npm install -g pnpm@10.12.1`
Set the Electron mirror environment variable and install Electron:
* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v36.4.0 -D`
* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v36.5.0 -D`
* Windows:
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
* `pnpm install electron@v36.4.0 -D`
* `pnpm install electron@v36.5.0 -D`
NPM mirror:
@ -27,7 +27,7 @@ NPM mirror:
Enter the app folder and execute:
* `pnpm install electron@v36.4.0 -D`
* `pnpm install electron@v36.5.0 -D`
* `pnpm run dev`
* `pnpm run start`

View file

@ -14,10 +14,10 @@
设置 Electron 镜像环境变量并安装 Electron
* macOS/Linux`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v36.4.0 -D`
* macOS/Linux`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v36.5.0 -D`
* Windows
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
* `pnpm install electron@v36.4.0 -D`
* `pnpm install electron@v36.5.0 -D`
NPM 镜像:
@ -27,7 +27,7 @@ NPM 镜像:
进入 app 文件夹执行:
* `pnpm install electron@v36.4.0 -D`
* `pnpm install electron@v36.5.0 -D`
* `pnpm run dev`
* `pnpm run start`

8
app/pnpm-lock.yaml generated
View file

@ -131,8 +131,8 @@ packages:
resolution: {integrity: sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==}
engines: {node: '>=12'}
'@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2':
resolution: {commit: 06b29aafb7708acef8b3669835c8a7857ebc92d2, repo: https://github.com/electron/node-gyp.git, type: git}
'@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2':
resolution: {tarball: https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2}
version: 10.2.0-electron.1
engines: {node: '>=12.13.0'}
hasBin: true
@ -2803,7 +2803,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2':
'@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2':
dependencies:
env-paths: 2.2.1
exponential-backoff: 3.1.2
@ -2840,7 +2840,7 @@ snapshots:
'@electron/rebuild@3.7.0':
dependencies:
'@electron/node-gyp': git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2
'@electron/node-gyp': https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2
'@malept/cross-spawn-promise': 2.0.0
chalk: 4.1.2
debug: 4.4.0

View file

@ -62,13 +62,29 @@ func extensionCopy(c *gin.Context) {
clippingSym := false
symArticleHref := ""
if nil != form.Value["href"] {
hasHref := nil != form.Value["href"]
isPartClip := nil != form.Value["clipType"] && form.Value["clipType"][0] == "part"
if hasHref && !isPartClip {
// 剪藏链滴帖子时直接使用 Markdown 接口的返回
// https://ld246.com/article/raw/1724850322251
symArticleHref = form.Value["href"][0]
if strings.HasPrefix(symArticleHref, "https://ld246.com/article/") || strings.HasPrefix(symArticleHref, "https://liuyun.io/article/") {
symArticleHref = strings.ReplaceAll(symArticleHref, "https://ld246.com/article/", "https://ld246.com/article/raw/")
symArticleHref = strings.ReplaceAll(symArticleHref, "https://liuyun.io/article/", "https://liuyun.io/article/raw/")
var baseURL, originalPrefix string
if strings.HasPrefix(symArticleHref, "https://ld246.com/article/") {
baseURL = "https://ld246.com/article/raw/"
originalPrefix = "https://ld246.com/article/"
} else if strings.HasPrefix(symArticleHref, "https://liuyun.io/article/") {
baseURL = "https://liuyun.io/article/raw/"
originalPrefix = "https://liuyun.io/article/"
}
if "" != baseURL {
articleID := strings.TrimPrefix(symArticleHref, originalPrefix)
if idx := strings.IndexAny(articleID, "/?#"); -1 != idx {
articleID = articleID[:idx]
}
symArticleHref = baseURL + articleID
clippingSym = true
}
}

View file

@ -60,6 +60,12 @@ func mergeSubDocs(rootTree *parse.Tree) (ret *parse.Tree, err error) {
break
}
}
if ast.NodeParagraph == insertPoint.Type && nil == insertPoint.FirstChild {
// 删除空段落
// Ignore the last empty paragraph block when exporting merged sub-documents https://github.com/siyuan-note/siyuan/issues/15028
insertPoint.Unlink()
}
return
}