mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e9c7ba082e
7 changed files with 24 additions and 37 deletions
|
|
@ -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."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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": " 文件夹数据一致,包括资源文件、自定义图标、插件、代码片段、模板、挂件和文档数据。"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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": " 文件夾資料一致,包括資源檔案、自訂圖示、外掛程式、程式碼片段、範本、掛件和文件資料。"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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": " フォルダのデータを一致させることです。リソース ファイル、カスタム アイコン、プラグイン、コード スニペット、テンプレート、ウィジェット、ドキュメント データが含まれます。"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 // 不可编辑
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue