- 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