0.7.0
New documentation website: https://stencil.fuller.li
Breaking
TemplateLoader
has been renamed toFileSystemLoader
. The
loadTemplate(s)
methods are now throwing and now take labels for thename
andnames
arguments.- Many internal classes are no longer public. Some APIs were previously
accessible due to earlier versions of Swift requiring the types to be public
to be able to test. Now we have access to@testable
these can correctly be
private. {% ifnot %}
tag is now deprecated, please use{% if not %}
instead.
Enhancements
-
Variable lookup now supports introspection of Swift types. You can now lookup
values of Swift structures and classes inside a Context. -
If tags can now use prefix and infix operators such as
not
,and
,or
,
==
,!=
,>
,>=
,<
and<=
.{% if one or two and not three %}
-
You may now register custom template filters which make use of arguments.
-
There is now a
default
filter.Hello {{ name|default:"World" }}
-
There is now a
join
filter.{{ value|join:", " }}
-
{% for %}
tag now supports filters.{% for user in non_admins|default:admins %} {{ user }} {% endfor %}