Author SHA1 Message Date
andinus 62a63d786a Handle *string 2025-02-08 18:36:36 +05:30
andinus 0c7fd9a814 Release v0.1.4 2025-01-09 21:48:44 +05:30
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -10,6 +10,10 @@ https://pypi.org/project/template-nest/.
* News * News
** v0.1.4 - 2025-01-09
+ Fix nil pointer dereference error.
** v0.1.3 - 2024-11-24 ** v0.1.3 - 2024-11-24
+ Fix handling of numeric types. + Fix handling of numeric types.
+6
View File
@@ -294,6 +294,12 @@ func (nest *TemplateNest) Render(toRender interface{}) (string, error) {
case bool: case bool:
return fmt.Sprintf("%t", v), nil return fmt.Sprintf("%t", v), nil
case *string:
if v == nil {
return "", nil
}
return nest.Render(*v)
case string: case string:
if nest.option.NoEscapeInput { if nest.option.NoEscapeInput {
return v, nil return v, nil