- Java 8
- Macros have access to all variables within the template and are no longer restricted to a "local scope"
- New signature for filters/functions/tests that accepts the PebbleTemplate, EvaluationContext, and line number
- Converted EvaluationContext to an interface with limited access to the underlying implementation
- A "null" used as a boolean expression now throws an error if strict variables is true, treated as "false" otherwise
- Improved error reporting
- Upgrade SLF4J from 1.6.1 to 1.7.21
- "raw" filter works for all variables, not just strings
- Improved error reporting for binary operators
- Added setting to disable the trimming of newlines after pebble tags
- Bug fix: Fix the use of the "set" tag within a for loop
- Bug fix: Fix the concatenation of SafeString (ex. the output of two macros)
- Added misc getters to various internal nodes
- Improved error when attempting to iterate over a non-iterable object
- Updates to pebble-spring-boot-starter
- Security Fix: Pebble was only escaping Strings; now it escapes the toString() output of all objects
- Official spring4 extension
- Official spring boot starter
- Bug fix: ConcurrentModificationException when importing macros in nested parallel blocks
- Bug fix: Exceptions in parallel blocks were being swallowed
- Bug fix: Obtaining a dynamic attribute of a variable was being incorrectly cached
- Improved error reporting
- Added "merge" filter
- Add support for strings to the "contains" operator
- Bug fix: Couldn't invoke methods that had boolean arguments
- Bug fix: Unexpected results when comparing the outputs of the "raw" filter
- Added method in PebbleEngine.Builder class to completely disable cache
- Improved error message with malformed ternary expression
- Bug fix: NPE when calling bean method will null argument
- Bug fix: relative paths were not platform agnostic
- Bug fix: slice filter failed on integer argument
- Bug fix: Pebble didn't work on GAE due to a restricted class in the JRE
- Backwards incompatibility: Removed method on PebbleEngine.Builder to register a filter as safe and not requiring escaping. The filter should return an instance of SafeString instead.
- Backwards incompatibility: Functions are now escaped unless they return instance of SafeString
- Spring beans are available in the evaluation context by default
- HTTP request is available in the evaluation context by default
- HTTP session is available in the evaluation context by default
- 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
- Support for custom escaping strategies
- Support for calling bean methods with primitive argument types
- Bug fix: Fixed issue with delegating loader where it would only use last loader in list of children loaders.
- Added rsort filter
- i18n extension now supports dynamic variables
- Bug fix: Failure to subscript an array of primitive type
- Bug fix: Global variables were not accessible in template
- Bug fix: Removed invocation of Character.isAlphabetic which is not supported on older android APIs
- New runtime exception thrown if there's an error invoking a member found via reflection
- New constructor in ClasspathLoader that accepts a custom classloader
- Bug fix: Fixed path separator used in ClasspathLoader to work on Windows
- Bug fix: Fixed path separator used in ServletLoader to work on Windows
- Added array and map syntax
- Fixed stack overflow error when using multiple levels of the parent() function
- Fixed platform dependent issues with junit tests
- Bug fix regarding the use of different data types passed to same template which broke an internal cache in the GetAttributeExpression
- Bug fix regarding NPE with internal cache
- Bug fix when using suffix with the file loader
- Bug fix for issue regarding multiple for loops only rendering first one
- Performance improvements
- Performance improvements
- Added ServletLoader which is the only built-in loader that works with JBoss/Wildfly
- Added "first" filter
- Added "last" filter
- Added "join" filter
- Fixed lexing issue on windows
- Fixed number comparison issue
- Added "filter" tag
- Added "abs" filter
- Added "sort" filter
- Pebble now uses the exact Map implementation provided by user instead of moving variables into it's own map implementation. This allows for custom "lazy" maps and other unique implementations.
- Arrays and lists can now be accessed by index
- Added verbatim tag
- Removed the LocaleAware interface; filters/functions/tests now get the locale via the EvaluationContext that is passed as a "_context" argument in the argument map
- Added a whitespace control character: "-"
- Fixed bug where macros were being secretly evaluated one too many times
- The ability to call bean methods that require arguments.
- For loop now works with primitive arrays (i.e. no longer just Iterable objects).
- Added "subscript syntax" support for accessing attributes.
- Continuous integration with travis-ci.
- Fixed NPE occurring in ternary expressions.
- Fixed issue with if-then-else expressions
- General code and testing improvements.
- Some code cleanup and fixed an incorrect unit test.
- No more code generation, all nodes of the AST are rendered during template evaluation phase.
- Autoescaping, more escaping strategies, autoescape tag, and raw filter.
- Extensions can now provide node visitors to traverse the AST.
- Macros can have default argument values.
- Implemented dynamic inheritance.
- Renamed 'message' function to 'i18n'
- Fixed issue where compilation failed in JBoss.
- Code cleanup and misc small bugs
- Implemented named arguments.
- Added dependency on google guava for template cache.
- Split the default loader class into multiple discrete loaders.
- Added the
title
filter. - Fixed issue where compilation mutex might not have been released.
- Fixed parsing issues if variable names were prefixed with operator names.
- Fixed issue where included templates didn't have access to context.
- Fixed issue where
if
tag could not be used directly on a boolean variable. - Removed the
format
filter. - Fixed misc other smaller bugs.
- Fixed major bug from v0.1.4 that prevented macros from being invoked more than once.
- The i18n extension is now enabled by default.
- Improved exception handling (storing cause where applicable).
- PebbleEngine now returns a PebbleTemplate interface with a small subset of original methods.
- Refactored function/filter/test interfaces into functional interfaces (preparation for Java 8).
- More unit tests and minor bug fixes.
- Fixed issue where child templates were being inappropriately cached.
- All core filters now perform null checking.
- Performance optimization with variable attributes.
- Renamed the number_format filter to numberformat
- Fixed issue where parent block didn’t have access to context.
- Macros no longer have access to context (only local vars).
- Fixed issue where macro output coudn’t be filtered/tested.
- Refactored how blocks and macros are implemented .
- Renamed number filter to number_format.
- Added a cache interface for user’s to provide their own cache. Also removed the “cacheTemplates” setting.
- Default cache is now thread safe.
- Templates can now be evaluated concurrently.
- Users can now safely attempt a concurrent compilation.
- Fixed issue where provided writer was being closed by pebble engine.
- Fixed memory leak in file manager.
- Removed json filter.
- Removed some third party dependencies.
- Added parallel tag.
- More unit tests and misc code cleanup.
- Fixed issue where templates of same name but different path were overriding each other in main template cache.
- Made sure byte code stored in memory in InMemoryJavaFileManager is cleared when no longer required.
- Removed caching of Reader objects from PebbleDefaultLoader which was causing more harm than good. This can be added back later if it is deemed necessary.
- Completely changed how operators are compiled into Java due to a bunch of bugs regarding operand types.
- Changed the behaviour of the == operator and added the equals operator as an alias.
- Extensions can now provide custom functions.
- Added source, min, and max functions.
- The setting, cacheTemplates, now defaults to true.
- Renamed the main entry points into the main Engine from “loadTemplate/render” to “compile/evaluate”.
- Added i18n extension (disabled by default) and a default locale setting on the main pebble engine. The extension adds one new function: message()
- Small performance improvements when looking up variable attributes.
- Refined PebbleEngine’s available public methods.
- Added “strictVariables” setting to PebbleEngine.
- Cleaned up how pebble-spring is to be configured.
- More bug fixes and unit tests.
- Configuration changes in order to have the project hosted in the Maven Central Repository.
- Dedicated website with documentation.
- Code refactoring, more unit tests, bug fixes.
- Conditional (ternary) operator.
- Escape filter.
- Macro overloading.
This is the first functioning version of Pebble. The following has been implemented:
- tags: block, extends, for, if, import, include, macro, set
- filters: abbreviate, capitalize, date, default, format, json, lower, number, trim, upper, urlencode
- functions: block, parent
- tests: empty, even, null, odd, iterable, equalTo
- operators: in, is, is not, +, -, /, *, %, and, or, (), ==, !=, <, >, <=, >=, |, .
- unit tests