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 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

    • โšก๏ธ Updated internal maintenance scripts, and switched to GitHub actions.
      David Jennes #321
    • Made the tokens property on a Template public.
      Stefanomondino #292
    • Made the Template.render(_:) method (that accepts a Context) public.
      David Jennes #322