From 76266cac87bec3c5fd56f6c8004fa57eebca5f11 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 22 Aug 2025 11:06:54 +0800 Subject: [PATCH] :art: Improve av https://github.com/siyuan-note/siyuan/issues/15590 --- kernel/filesys/stat.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/kernel/filesys/stat.go b/kernel/filesys/stat.go index baeb9cf27..09a83b3c5 100644 --- a/kernel/filesys/stat.go +++ b/kernel/filesys/stat.go @@ -18,6 +18,7 @@ package filesys import ( "bytes" + "github.com/88250/lute" "github.com/88250/lute/ast" "github.com/88250/lute/parse" @@ -126,14 +127,14 @@ func statTree(tree *parse.Tree) (ret *util.BlockStatResult) { for _, v := range kValues.Values { switch kValues.Key.Type { case av.KeyTypeURL: - if v.IsEmpty() { + if v.IsBlank() { continue } dbLinkCnt++ content.WriteString(v.URL.Content) case av.KeyTypeMAsset: - if v.IsEmpty() { + if v.IsBlank() { continue } @@ -143,7 +144,7 @@ func statTree(tree *parse.Tree) (ret *util.BlockStatResult) { } } case av.KeyTypeBlock: - if v.IsEmpty() { + if v.IsBlank() { continue } @@ -152,23 +153,23 @@ func statTree(tree *parse.Tree) (ret *util.BlockStatResult) { } content.WriteString(v.Block.Content) case av.KeyTypeText: - if v.IsEmpty() { + if v.IsBlank() { continue } content.WriteString(v.Text.Content) case av.KeyTypeNumber: - if v.IsEmpty() { + if v.IsBlank() { continue } v.Number.FormatNumber() content.WriteString(v.Number.FormattedContent) case av.KeyTypeEmail: - if v.IsEmpty() { + if v.IsBlank() { continue } content.WriteString(v.Email.Content) case av.KeyTypePhone: - if v.IsEmpty() { + if v.IsBlank() { continue } content.WriteString(v.Phone.Content)