Stencil v0.15.0 Release Notes
-
๐ฅ Breaking
- โฌ๏ธ Drop support for Swift < 5. For Swift 4.2 support, you should use Stencil 0.14.2.
David Jennes #323
โจ Enhancements
- โ Added support for trimming whitespace around blocks with Jinja2 whitespace control symbols. eg
{%- if value +%}
.
Miguel Bejar Yonas Kolb #92 #287 - โ Added support for adding default whitespace trimming behaviour to an environment.
Yonas Kolb #287 - Blocks now can be used repeatedly in the template. When block is rendered for the first time its content will be cached and it can be rendered again later using
{{ block.block_name }}
.
Ilya Puchka #158 #182 - โ Added
break
andcontinue
tags to break or continue current loop.
Ilya Puchka #175 - You can now access outer loop's scope by labeling it:
{% outer: for ... %}... {% for ... %} {{ outer.counter }} {% endfor %}{% endfor %}
.
Ilya Puchka #175 - Boolean expressions can now be rendered, i.e
{{ name == "John" }}
will rendertrue
orfalse
depending on the evaluation result.
Ilya Puchka David Jennes #164 #325 - ๐ Enable dynamic member lookup using a new
DynamicMemberLookup
marker protocol. Conform your own types to this protocol to support dynamic member from with contexts.
Ilya Puchka #219 #246 - ๐ Allow providing lazily evaluated context data, using the
LazyValueWrapper
structure.
David Jennes #324
๐ Bug Fixes
- ๐ Fixed using
{{ block.super }}
inside nodes other thanblock
.
Ilya Puchka #266 #267
Internal Changes
- โก๏ธ Updated internal maintenance scripts, and switched to GitHub actions.
David Jennes #321 - Made the
tokens
property on aTemplate
public.
Stefanomondino #292 - Made the
Template.render(_:)
method (that accepts aContext
) public.
David Jennes #322
- โฌ๏ธ Drop support for Swift < 5. For Swift 4.2 support, you should use Stencil 0.14.2.