-
Added
register
andunregister
methods to manage the customed method. -
Resolved
__escapehtml
global pollution.
-
Added
#id
support for tpl parameter. -
Support custom the tags by
juicer.set('tag::someTag', 'yourTag')
. -
Fixed
each … range
bug that ranges are incorrect.
-
Fixed
#id
support invalid bug because ofvar document
. -
Fixed
lexical analyze
bug (Issue #3
), for example:{@if a == b}
will throw b is undefined.
-
Fixed
lexical analyze
bug (Issue #4
), for example:{@if a == true}
will throwUnexpected token true
. -
Fixed
lexical analyze
bug (Issue #5
), for example:{@else if a == b}
will throw a is undefined.
-
Added
arguments support
when using helper function (Pull #6
). -
Added
Object each operation support
.
- Update
whitelist
for lexicalAnalyze.
- Fixed
window
is not defined warning under expressjs. - Added
expressjs
wrapper, and demo.
- Fixed
Object each operation
bug.
- Compatible for
avoid re-declare native function
for node.js.
- Fixed
varialble outer each statement environment
bug (Issue #8
), for example:{@each array as item}${item}{@/each}${item}
.
- avoid re-declare registered function, if not do this, template
{@if registered_func(name)}
could be throw undefined.
- fixed bug for Firefox 14.0.1 (
issue #9
, https://bugzilla.mozilla.org/show_bug.cgi?id=785822). - added adapter for expressjs-3.x.
- avoid re-analyze method statement variable.
- fixed bug that variable support in
each .. range
expression (issue #16
). - added sub-template support using
{@include sub, data}
.
- update testcase of sub-template support.
- added command line support for node.js, using for precompile the template files,
npm install -g juicer
.
- fixed bug that
if(console)
detection will throw error under some browser (like ie6).
- added
other helper types support
, not only the function type, but also can be object type, etc. fixedvariableAnalyze
forobject[variable]
statement.
- added
include tag compatible for node.js
, now you can use{@include file://./index.tpl}
to include sub-template files in node.js,include
tag without the quotes will be passed.
- added
inline helper register
, now you can use{@helper name} .. {@/helper}
to register helper function both in node.js or browser.
- update
inline helper register
for browser support.
- set
cache
tofalse
as default in node.js environment, avoid memory leak.
- fixed bug that inline helper register failed with slashes content (
issue #78
).
- fixed
__escapehtml
bug that'
will not be escaped.
- added
cachestore
option to support the cache storage custom, e.g. LRUCache.
- fixed regular expressions in
variableAnalyze
method.
- pass-through
this
to helper function as running context.