Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Document block sort value changed from `0` to `100` https://github.com/siyuan-note/siyuan/issues/12886

Danielad91c2dfc3c7
diff --git a/kernel/sql/database.go b/kernel/sql/database.go
index 4e8ab20b19..45482111d5 100644
--- a/kernel/sql/database.go
+++ b/kernel/sql/database.go
@@ -1422,8 +1422,6 @@ func execStmtTx(tx *sql.Tx, stmt string, args ...interface{}) (err error) {
func nSort(n *ast.Node) int {
switch n.Type {
// 以下为块级元素
- case ast.NodeDocument:
- return 0
case ast.NodeHeading:
return 5
case ast.NodeParagraph:
@@ -1446,6 +1444,8 @@ func nSort(n *ast.Node) int {
return 30
case ast.NodeAttributeView:
return 30
+ case ast.NodeDocument:
+ return 100
case ast.NodeText, ast.NodeTextMark:
if n.IsTextMarkType("tag") {
return 205