🎨 Add block content statistics template function statBlock https://github.com/siyuan-note/siyuan/issues/13438

This commit is contained in:
Daniel 2024-12-11 23:59:58 +08:00
parent e2017a9fba
commit 11d3516aa7
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 237 additions and 167 deletions

View file

@ -27,6 +27,7 @@ import (
"github.com/88250/lute/ast"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/av"
"github.com/siyuan-note/siyuan/kernel/filesys"
"github.com/siyuan-note/siyuan/kernel/treenode"
"github.com/siyuan-note/siyuan/kernel/util"
)
@ -420,7 +421,7 @@ func RenderTemplateCol(ial map[string]string, rowValues []*av.KeyValues, tplCont
}
goTpl := template.New("").Delims(".action{", "}")
tplFuncMap := treenode.BuiltInTemplateFuncs()
tplFuncMap := filesys.BuiltInTemplateFuncs()
SQLTemplateFuncs(&tplFuncMap)
goTpl = goTpl.Funcs(tplFuncMap)
tpl, err := goTpl.Parse(tplContent)