Skip to content

v2.0.1

Compare
Choose a tag to compare
@jhsx jhsx released this 29 Aug 12:21
· 211 commits to master since this release
  • fixed negative numbers in the template throwing an error – this happened, for example, when using {{ replace("My Name Is", " ", "_", -1) }} which would error (the last parameter of Go's replace function denotes the maximum number of replacements to perform, -1 being unlimited) – fixed in fd3b9c0
  • added {{ includeIfExists(templateName) }} function that doesn't throw an error if the template to include doesn't exist (useful for dynamic template files to include); it also has a second form where you can use the boolean return value to print something else if the template couldn't be found – documented here, added in 9a0ef3b