From 202ccfa5cfb7c3c842ce08c5d6533a5cab56aebc Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 24 Aug 2025 15:16:10 +0800 Subject: [PATCH] :art: Limit the database title to 512 characters https://github.com/siyuan-note/siyuan/issues/15459 --- kernel/model/attribute_view_fix.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/model/attribute_view_fix.go b/kernel/model/attribute_view_fix.go index efe883415..82280bea3 100644 --- a/kernel/model/attribute_view_fix.go +++ b/kernel/model/attribute_view_fix.go @@ -101,10 +101,7 @@ func checkAttrView(attrView *av.AttributeView, view *av.View) { } } - if strings.Contains(attrView.Name, "\n") { - attrView.Name = strings.ReplaceAll(attrView.Name, "\n", " ") - } - + attrView.Name = strings.ReplaceAll(attrView.Name, "\n", " ") // 截断超长的数据库标题 Limit the database title to 512 characters https://github.com/siyuan-note/siyuan/issues/15459 if 512 < utf8.RuneCountInString(attrView.Name) { attrView.Name = gulu.Str.SubStr(attrView.Name, 512)