Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62a63d786a
|
||
|
|
0c7fd9a814
|
@@ -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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user