github stencilproject/Stencil 0.15.0

latest release: 0.15.1
21 months ago

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 and continue 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 render true or false 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

Internal Changes

Don't miss a new Stencil release

NewReleases is sending notifications on new releases.