From 2bb12d67aab89d684b70869b51627a2ea3b7ee3c Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 13 Nov 2022 10:20:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:memo:=20=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/appearance/langs/en_US.json | 4 ++-- app/appearance/langs/zh_CHT.json | 4 ++-- app/appearance/langs/zh_CN.json | 4 ++-- .../20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy | 12 ++---------- .../20210808180117-czj9bvb/20200813093015-u6bopdt.sy | 8 -------- .../20211226090932-5lcq56f/20211226115227-r1rty9v.sy | 8 -------- 6 files changed, 8 insertions(+), 32 deletions(-) diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index 08bd1b3b7..00bbc5d79 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1,7 +1,7 @@ { "syncOfficialProviderIntro": "Currently selected is the cloud storage service officially provided by SiYuan, which only supports paid subscription users", - "syncThirdPartyProviderS3Intro": "The current selected is a third-party cloud storage service compatible with the Amazon S3 protocol. This feature support is currently in the free public beta stage", - "syncThirdPartyProviderWebDAVIntro": "The currently selected is a third-party cloud storage service with the WebDAV protocol. This feature support is currently in the free public beta stage", + "syncThirdPartyProviderS3Intro": "The current selected is a third-party cloud storage service compatible with the Amazon S3 protocol (eg Qiniu, Aliyun OSS, Cloudflare R2). This feature support is currently in the free public beta stage", + "syncThirdPartyProviderWebDAVIntro": "The currently selected is a third-party cloud storage service with the WebDAV protocol (eg TeraCLOUD). This feature support is currently in the free public beta stage", "syncThirdPartyProviderTip": "Before using this feature, please pay attention to the technical limitations and billing items of the third-party cloud storage service:
Disclaimer: For details, please refer to the relevant terms in the open source license AGPLv3 used by SiYuan", "syncProvider": "Cloud Storage Service Provider", "syncProviderTip": "If selected, the cloud storage service of this provider will be used to achieve cloud synchronization and backup functions", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index ac6ac2e20..a22c4dbf3 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1,7 +1,7 @@ { "syncOfficialProviderIntro": "當前選擇的是 SiYuan 官方提供的雲端存儲服務,僅支持付費訂閱用戶使用", - "syncThirdPartyProviderS3Intro": "當前選擇的是 Amazon S3 協議兼容的第三方雲端存儲服務,該特性支持目前處於免費公測階段", - "syncThirdPartyProviderWebDAVIntro": "當前選擇的是 WebDAV 協議的第三方雲端存儲服務,該特性支持目前處於免費公測階段", + "syncThirdPartyProviderS3Intro": "當前選擇的是 Amazon S3 協議兼容的第三方雲端存儲服務(比如七牛雲阿里雲 OSSCloudflare R2),該特性支持目前處於免費公測階段", + "syncThirdPartyProviderWebDAVIntro": "當前選擇的是 WebDAV 協議的第三方雲端存儲服務(比如 TeraCLOUD),該特性支持目前處於免費公測階段", "syncThirdPartyProviderTip": "在使用該特性前,請注意第三方雲端存儲服務的技術限制和計費項目等條款:
免責聲明:詳見思源筆記所使用的開源許可證 AGPLv3 中的相關條款", "syncProvider": "雲端存儲服務提供商", "syncProviderTip": "選擇後將使用該提供商的雲端存儲服務實現雲端同步和備份功能", diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 8064e36e2..41740afcf 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1,7 +1,7 @@ { "syncOfficialProviderIntro": "当前选择的是 SiYuan 官方提供的云端存储服务,仅支持付费订阅用户使用", - "syncThirdPartyProviderS3Intro": "当前选择的是 Amazon S3 协议兼容的第三方云端存储服务,该特性支持目前处于免费公测阶段", - "syncThirdPartyProviderWebDAVIntro": "当前选择的是 WebDAV 协议的第三方云端存储服务,该特性支持目前处于免费公测阶段", + "syncThirdPartyProviderS3Intro": "当前选择的是 Amazon S3 协议兼容的第三方云端存储服务(比如七牛云阿里云 OSSCloudflare R2),该特性支持目前处于免费公测阶段", + "syncThirdPartyProviderWebDAVIntro": "当前选择的是 WebDAV 协议的第三方云端存储服务(比如 TeraCLOUD),该特性支持目前处于免费公测阶段", "syncThirdPartyProviderTip": "在使用该特性前,请注意第三方云端存储服务的技术限制和计费项目等条款:
免责声明:详见思源笔记所使用的开源许可证 AGPLv3 中的相关条款", "syncProvider": "云端存储服务提供商", "syncProviderTip": "选择后将使用该提供商的云端存储服务实现云端同步和备份功能", diff --git a/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy b/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy index 77402a4ee..8dc25cf02 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy @@ -592,7 +592,7 @@ "Type": "NodeTextMark", "TextMarkType": "a", "TextMarkAHref": "https://s.qiniu.com/VbQfeu", - "TextMarkTextContent": "Qiniu Cloud" + "TextMarkTextContent": "Qiniu" }, { "Type": "NodeText", @@ -602,7 +602,7 @@ "Type": "NodeTextMark", "TextMarkType": "a", "TextMarkAHref": "https://www.aliyun.com/product/oss?userCode=yqovuas2", - "TextMarkTextContent": "Alibaba Cloud OSS" + "TextMarkTextContent": "Aliyun OSS" }, { "Type": "NodeText", @@ -613,10 +613,6 @@ "TextMarkType": "a", "TextMarkAHref": "https://www.cloudflare.com/", "TextMarkTextContent": "Cloudflare R2" - }, - { - "Type": "NodeText", - "Data": ", etc." } ] } @@ -661,10 +657,6 @@ "TextMarkType": "a", "TextMarkAHref": "https://koofr.eu/", "TextMarkTextContent": "Koofr" - }, - { - "Type": "NodeText", - "Data": ", etc." } ] } diff --git a/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy b/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy index b86a07b98..e119b0823 100644 --- a/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy +++ b/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy @@ -717,10 +717,6 @@ "TextMarkType": "a", "TextMarkAHref": "https://www.cloudflare.com/", "TextMarkTextContent": "Cloudflare R2" - }, - { - "Type": "NodeText", - "Data": " 等" } ] } @@ -754,10 +750,6 @@ "TextMarkType": "a", "TextMarkAHref": "https://teracloud.jp/", "TextMarkTextContent": "TeraCLOUD" - }, - { - "Type": "NodeText", - "Data": " 等" } ] } diff --git a/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy b/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy index 29677513b..00c740a4c 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy @@ -607,10 +607,6 @@ "TextMarkType": "a", "TextMarkAHref": "https://www.cloudflare.com/", "TextMarkTextContent": "Cloudflare R2" - }, - { - "Type": "NodeText", - "Data": " 等" } ] } @@ -655,10 +651,6 @@ "TextMarkType": "a", "TextMarkAHref": "https://koofr.eu/", "TextMarkTextContent": "Koofr" - }, - { - "Type": "NodeText", - "Data": " 等" } ] } From b110db9c59bd3600a5debdfbbed495a1f5c8b38e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 13 Nov 2022 21:07:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:bug:=20`[[`=20=E5=BC=95=E7=94=A8=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E9=94=9A=E6=96=87=E6=9C=AC=E9=95=BF=E5=BA=A6=E9=99=90?= =?UTF-8?q?=E5=88=B6=E6=97=A0=E6=95=88=20Fix=20https://github.com/siyuan-n?= =?UTF-8?q?ote/siyuan/issues/6566?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/search.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/model/search.go b/kernel/model/search.go index 6b2ec11af..daa97f4ad 100644 --- a/kernel/model/search.go +++ b/kernel/model/search.go @@ -117,11 +117,8 @@ func SearchRefBlock(id, rootID, keyword string, beforeLen int) (ret []*Block, ne if nil == block { continue } - block.Content = maxContent(block.Content, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) - block.RefText = block.Content - if block.IsContainerBlock() { - block.RefText = block.FContent // `((` 引用列表项时使用第一个子块作为动态锚文本 https://github.com/siyuan-note/siyuan/issues/4536 - } + block.RefText = sql.GetRefText(block.ID) + block.RefText = maxContent(block.RefText, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) ret = append(ret, block) } if 1 > len(ret) { @@ -135,9 +132,9 @@ func SearchRefBlock(id, rootID, keyword string, beforeLen int) (ret []*Block, ne trees := map[string]*parse.Tree{} for _, b := range ret { hitFirstChildID := false - b.RefText = b.Content + b.RefText = sql.GetRefText(b.ID) + b.RefText = maxContent(b.RefText, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) if b.IsContainerBlock() { - b.RefText = b.FContent // `((` 引用列表项时使用第一个子块作为动态锚文本 https://github.com/siyuan-note/siyuan/issues/4536 // `((` 引用候选中排除当前块的父块 https://github.com/siyuan-note/siyuan/issues/4538 tree := trees[b.RootID] @@ -154,7 +151,6 @@ func SearchRefBlock(id, rootID, keyword string, beforeLen int) (ret []*Block, ne } if b.ID != id && !hitFirstChildID && b.ID != rootID { - b.Content = maxContent(b.Content, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) tmp = append(tmp, b) } }