Skip to content

v2.0.0

Compare
Choose a tag to compare
@ebussieres ebussieres released this 21 Apr 19:15
· 618 commits to master since this release
  • Support for relative template paths
  • Added a "cache" tag to cache portions of a template
  • String concatenation with "~" operator
  • Added two global variables into the context
    • "locale": the current locale
    • "template": reference to the actual template. Can be used to get the template name with {{ template.name }}
  • "Length" filter
  • "Replace" filter
  • Support for parallel template parsing
  • Additional loop variables: last, first, revindex
  • "equals" support for enums
  • Added a range function and ability to iterate over a range of characters/numbers
  • Added support for BigDecimals
  • Expressions are permitted within square bracket notation when accessing maps/arrays/lists
  • Better error handling with more informative exceptions
  • Ability to add extra variables to the context when "including" another template
  • Bug fix: "defined" test did not work as expected in strict mode
  • Bug fix: fixed broken "less than equal" comparison
  • Backwards incompatibility: "Included" templates run in their own dedicated scope and no longer affect the variables of the template that included it.
  • Backwards incompatibility: Constructor for PebbleEngine is now private, must use PebbleEngine.Builder
  • Backwards incompatibility: PebbleEngine is immutable once constructed
  • Backwards incompatibility: Removed "getExtension" method from PebbleEngine, core extensions must be configured during construction of the PebbleEngine object
  • Backwards incompatibility: Removed deprecated LocaleAware interface
  • Backwards incompatibility: Extensions are now expected to return NodeVisitorFactory objects instead of NodeVisitors