diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy index c21f96bf7..4bb2c23fd 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy @@ -6,7 +6,7 @@ "id": "20210721112206-mhr9wxi", "title": "Data sync", "type": "doc", - "updated": "20250115162705" + "updated": "20250218121000" }, "Children": [ { @@ -15,7 +15,7 @@ "HeadingLevel": 2, "Properties": { "id": "20210721112403-8no39l4", - "updated": "20210721112403" + "updated": "20250218121000" }, "Children": [ { @@ -29,7 +29,7 @@ "Type": "NodeParagraph", "Properties": { "id": "20210721112403-0ft3r91", - "updated": "20210721113101" + "updated": "20250218121000" }, "Children": [ { @@ -43,7 +43,7 @@ }, { "Type": "NodeText", - "Data": " folder data consistent on multiple devices, including asset files, templates, widgets, and notebook data." + "Data": "​ folder data consistent on multiple devices, includes assets, custom icons, plugins, code snippets, templates, widgets, and document data." } ] }, diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy index d0d15082d..052f082c6 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy @@ -6,7 +6,7 @@ "id": "20230808120347-3cob0nb", "title": "数据同步", "type": "doc", - "updated": "20250115162650" + "updated": "20250218120940" }, "Children": [ { @@ -15,7 +15,7 @@ "HeadingLevel": 2, "Properties": { "id": "20230808120347-wx5cr4v", - "updated": "20210721103911" + "updated": "20250218120940" }, "Children": [ { @@ -29,7 +29,7 @@ "Type": "NodeParagraph", "Properties": { "id": "20230808120347-q4v034g", - "updated": "20210721103854" + "updated": "20250218120940" }, "Children": [ { @@ -43,23 +43,7 @@ }, { "Type": "NodeText", - "Data": " 文件夹数据一致,包括" - }, - { - "Type": "NodeText", - "Data": "资源文件" - }, - { - "Type": "NodeText", - "Data": "、模板、" - }, - { - "Type": "NodeText", - "Data": "挂件" - }, - { - "Type": "NodeText", - "Data": "以及笔记本数据。" + "Data": "​ 文件夹数据一致,包括资源文件、自定义图标、插件、代码片段、模板、挂件和文档数据。" } ] }, diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy index b847a644a..59cc9c81b 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy @@ -6,7 +6,7 @@ "id": "20211226121438-xaafdo8", "title": "資料同步", "type": "doc", - "updated": "20250115162655" + "updated": "20250218121017" }, "Children": [ { @@ -15,7 +15,7 @@ "HeadingLevel": 2, "Properties": { "id": "20211226121454-8vr6fgn", - "updated": "20211226010158" + "updated": "20250218121017" }, "Children": [ { @@ -29,7 +29,7 @@ "Type": "NodeParagraph", "Properties": { "id": "20211226121454-2wnvrmj", - "updated": "20211228141310" + "updated": "20250218121017" }, "Children": [ { @@ -43,7 +43,7 @@ }, { "Type": "NodeText", - "Data": " 文件夾資料一致,包括資料文件、範本、小工具以及筆記本資料。" + "Data": "​ 文件夾資料一致,包括資源檔案、自訂圖示、外掛程式、程式碼片段、範本、掛件和文件資料。" } ] }, diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-cb37szr/20240530101000-vhq5afs/20240530101000-wo49zvq.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-cb37szr/20240530101000-vhq5afs/20240530101000-wo49zvq.sy index 643f14036..ee0f14231 100644 --- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-cb37szr/20240530101000-vhq5afs/20240530101000-wo49zvq.sy +++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-cb37szr/20240530101000-vhq5afs/20240530101000-wo49zvq.sy @@ -7,7 +7,7 @@ "id": "20240530101000-wo49zvq", "title": "データ同期", "type": "doc", - "updated": "20240530101000" + "updated": "20250218121028" }, "Children": [ { @@ -17,7 +17,7 @@ "Properties": { "ID": "20240530101000-otrm2qw", "id": "20240530101000-qw5ujp4", - "updated": "20240530101000" + "updated": "20250218121028" }, "Children": [ { @@ -30,9 +30,8 @@ "ID": "20240530101000-6vtiz1y", "Type": "NodeParagraph", "Properties": { - "ID": "20240530101000-w5it1v3", "id": "20240530101000-6vtiz1y", - "updated": "20240530101000" + "updated": "20250218121028" }, "Children": [ { @@ -46,7 +45,7 @@ }, { "Type": "NodeText", - "Data": "​ フォルダのデータを一致させることです。これには、アセットファイル、テンプレート、ウィジェット、ノートブックデータが含まれます。" + "Data": "​ フォルダのデータを一致させることです。リソース ファイル、カスタム アイコン、プラグイン、コード スニペット、テンプレート、ウィジェット、ドキュメント データが含まれます。" } ] }, diff --git a/kernel/model/backlink.go b/kernel/model/backlink.go index 0ed8df473..cebcfbe94 100644 --- a/kernel/model/backlink.go +++ b/kernel/model/backlink.go @@ -230,7 +230,7 @@ func buildBacklink(refID string, refTree *parse.Tree, originalRefBlockIDs map[st } // 反链面板中显示块引用计数 Display reference counts in the backlink panel https://github.com/siyuan-note/siyuan/issues/13618 - fillBlockRefCount(renderNodes) + fillBlockRefCount(renderNodes, 0) dom := renderBlockDOMByNodes(renderNodes, luteEngine) var blockPaths []*BlockPath @@ -586,6 +586,10 @@ func buildLinkRefs(defRootID string, refs []*sql.Ref, keywords []string) (ret [] } } } + refsCountDelta := len(paragraphParentIDs) + paragraphParentIDs = gulu.Str.RemoveDuplicatedElem(paragraphParentIDs) + refsCountDelta -= len(paragraphParentIDs) + refsCount -= refsCountDelta sqlParagraphParents := sql.GetBlocks(paragraphParentIDs) paragraphParents := fromSQLBlocks(&sqlParagraphParents, "", 12) diff --git a/kernel/model/block.go b/kernel/model/block.go index 959ec28e4..06194405a 100644 --- a/kernel/model/block.go +++ b/kernel/model/block.go @@ -902,7 +902,7 @@ func getEmbeddedBlock(trees map[string]*parse.Tree, sqlBlock *sql.Block, heading } // 嵌入块查询结果中显示块引用计数 https://github.com/siyuan-note/siyuan/issues/7191 - fillBlockRefCount(nodes) + fillBlockRefCount(nodes, 1) luteEngine := NewLute() luteEngine.RenderOptions.ProtyleContenteditable = false // 不可编辑 diff --git a/kernel/model/render.go b/kernel/model/render.go index 97b67c087..82d459e20 100644 --- a/kernel/model/render.go +++ b/kernel/model/render.go @@ -144,7 +144,7 @@ func renderBlockText(node *ast.Node, excludeTypes []string, removeLineBreak bool return } -func fillBlockRefCount(nodes []*ast.Node) { +func fillBlockRefCount(nodes []*ast.Node, minRefCount int) { var defIDs []string for _, n := range nodes { ast.Walk(n, func(n *ast.Node, entering bool) ast.WalkStatus { @@ -166,7 +166,7 @@ func fillBlockRefCount(nodes []*ast.Node) { return ast.WalkContinue } - if cnt := refCount[n.ID]; 0 < cnt { + if cnt := refCount[n.ID]; minRefCount < cnt { n.SetIALAttr("refcount", strconv.Itoa(cnt)) } return ast.WalkContinue