mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-30 20:25:17 +01:00
🎨 块引新建文档存放位置 支持模板变量 https://github.com/siyuan-note/siyuan/issues/4693
This commit is contained in:
parent
ee6c39744f
commit
533590cd05
4 changed files with 35 additions and 4 deletions
|
|
@ -41,8 +41,8 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
)
|
||||
|
||||
func RenderCreateDocNameTemplate(nameTemplate string) (ret string, err error) {
|
||||
tpl, err := template.New("").Funcs(sprig.TxtFuncMap()).Parse(nameTemplate)
|
||||
func RenderGoTemplate(templateContent string) (ret string, err error) {
|
||||
tpl, err := template.New("").Funcs(sprig.TxtFuncMap()).Parse(templateContent)
|
||||
if nil != err {
|
||||
return "", errors.New(fmt.Sprintf(Conf.Language(44), err.Error()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue