This repository has been archived by the owner on Apr 11, 2018. It is now read-only.
Releases: paularmstrong/swig
Releases · paularmstrong/swig
v0.9.3
v0.9.0
- Added DateZ license to browser header, use link to underscore license.
- Added Timezone support in
date
filter gh-27. - Added New
raw
tag. - Changed Swig is no longer node 0.4 compatible.
- Fixed Filter
date('f')
for 10am times. - Fixed Filter
date('r')
returns in UTC date format. This is more correct tospec RFC2822, per php.net/date. - Fixed Filter
add
when adding numbers/numbers+strings together. - Fixed Tests for error messages that changed in node >0.6.0.
v0.8.0
- Added date filter formats
z
,W
,t
,L
,o
,B
, andc
. - Added New
filter
tag. - Added Node.js compatible 0.4.1 - 0.6.X
- Added Allow setting cache globally or per-template.
- Changed Removed
swig.render
andswig.fromString
. - Changed
swig.fromFile
is nowswig.compileFile
. - Changed
swig.init()
will clear template cache. - Changed
swig.init()
is now optional for browser mode with no custom settings. - Changed Development dependencies are be more lenient.
- Fixed Parser will properly preserver '' escaping. gh-24
- Fixed Rewrote tag argument parsing for proper space handling.
- Fixed Rewrote filter argument parsing. gh-23
- Fixed Allow pipe
|
characters in filter arguments. gh-22
v0.7.0
v0.6.0
- Added
{% import foo as bar %}
tag for importing macros. - Added Allow escaping for js in escape filter and autoescape tag.
- Added
raw
filter to force variable to not be escaped. - Added
escape
ande
filters to force variable to be escaped. - Added Allow filters to accept any JS objects, arrays, strings, and context variables.
- Changed
if
,else
, andelse if
tags support all JS-valid if-syntaxes + extra operators. - Fixed
default
filter for undefined variables. closes gh-18
v0.5.0
- Added More error messaging in some edge cases.
- Added Better error messaging including context and line numbers.
- Changed Improved compile and render speeds.
- Changed
include
tags accept context variables instead of just strings. - Changed Templates can be compiled and rendered from an absolute path outside of the template root.
- Fixed Will not double escape output.
v0.4.0
- Added Macro support docs
- Changed Removed requirement to manually specify
locals
for express support. - Changed Increased cache lookup speed by removing crypto dependency.
- Fixed
length
filter returns length of objects (number of keys). - Fixed Filters return empty string unless they can apply to the given object.
- Fixed Filters will attempt to apply to all values in an object or array.
v0.3.0
- Fixed Critical fix for negations in
if
blocks. - Added Support for
forloop.first
infor
blocks. - Added Support for
forloop.last
infor
blocks. - Added Support for
forloop.key
infor
blocks. - Added Support for
{% empty %}
infor
blocks.
v0.2.0
- Fixed
if
statements allow filters applied to operands. - Fixed
for
loops allow filters applied to the object that will be iterated over.