Skip to content

v4.0.0

Compare
Choose a tag to compare
@flosch flosch released this 13 Sep 21:48
· 74 commits to master since this release

Changes in this long awaited release:

Library

  • First semver version with Go modules compatibility
  • Several bug fixes
  • Improved error handling
  • Several refactorings to speed up execution and reduce allocations, including support for io.Writerin Execute() functions and short-circuit evaluations in expressions
  • Add TemplateSet.FromBytes
  • Add RenderTemplateBytes
  • Add Template.ExecuteWriterUnbuffered
  • Add TemplateLoader interface and according functions for virtual filesystem support (incl. support for multiple loaders)
  • Add pongo2.SetAutoescape for a global behavior change
  • Add whitespace control for tags and blocks, supporting {%- and -%} for tags and pongo2.Options for blocks
  • Add pongo2.CleanCache to remove files from the template cache
  • Add support for template functions that return an error as the second return value
  • Add Template.ExecuteBlocks to render supplied list of blocks only

See v3.0...v4.0.0 for a full list of changes.
Thanks to all contributors!

Template Language

  • Add support for single quotes in variables, functions and tags
  • Add support for if_exists-flag in include-tag
  • Add support for sorted-flag in for-tag with support for maps and arrays/slices
  • Add block.Super support
  • Add split filter