mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Add template func pow, powf, log and logf https://github.com/siyuan-note/siyuan/issues/9911
This commit is contained in:
parent
a6c1fd9408
commit
20462f302d
4 changed files with 49 additions and 29 deletions
|
|
@ -18,7 +18,6 @@ package treenode
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/Masterminds/sprig/v3"
|
||||
"github.com/siyuan-note/siyuan/kernel/av"
|
||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||
"strings"
|
||||
|
|
@ -834,7 +833,7 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av
|
|||
ial["updated"] = time.UnixMilli(block.Block.Updated).Format("20060102150405")
|
||||
}
|
||||
|
||||
funcMap := sprig.TxtFuncMap()
|
||||
funcMap := util.BuiltInTemplateFuncs()
|
||||
goTpl := template.New("").Delims(".action{", "}")
|
||||
tpl, tplErr := goTpl.Funcs(funcMap).Parse(tplContent)
|
||||
if nil != tplErr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue