pongo2 v4.0.1 Release Notes

Release Date: 2020-11-27 // about 1 year ago

Previous changes from v4.0.0

  • 🚀 Changes in this long awaited release:


    • 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