Handle *string

This commit is contained in:
Andinus 2025-02-08 18:36:36 +05:30
parent 0c7fd9a814
commit 62a63d786a
Signed by: andinus
SSH Key Fingerprint: SHA256:rop/w9c/gwtEJhUWS5curN3KJEwRr+Fm1ojM3liQTqo

@ -294,6 +294,12 @@ func (nest *TemplateNest) Render(toRender interface{}) (string, error) {
case bool:
return fmt.Sprintf("%t", v), nil
case *string:
if v == nil {
return "", nil
}
return nest.Render(*v)
case string:
if nest.option.NoEscapeInput {
return v, nil