| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #820
|
|
|
| |
Final change for #731
|
|
|
|
|
|
|
| |
- Move the lookup null protection out of `nameLookup` and into that contexts that are aware of the needs for falsy vs. not displayed values.
- Optimize lookup for nested path operations
Fixes #731
|
|
|
| |
This has a very positive impact on precompiled output size, particularly for known-helpers cases, and little or no impact on the throughput numbers.
|
|
|
| |
Fixes #772
|
|
|
| |
Fixes #743
|
|\
| |
| | |
properly handle multiple subexpressions in the same hash, fixes #748
|
| |
| |
| |
| |
| | |
push all hash params before popping any so as to avoid the last stackN var
stomping previous ones
|
|/
|
|
|
|
|
| |
looks like this broke in 2812fe27
also s/this.i/var i/, since the functions that needed it were removed in
a1edab6ef
|
| |
|
| |
|
|\
| |
| | |
Convert template spec to object literal
|
| |
| |
| | |
This allows for metadata to be associated with the template and a simplification of the template init logic.
|
|/ |
|
|
|
|
| |
Allows helpers that care about where a particular field came from derive this data while maintaining backward compatibility with existing helpers.
|
|
|
| |
Fixes #658
|
| |
|
|
|
|
| |
setup options to use a hash helper.
|
|\
| |
| | |
It would be great to have the helper name passed to `blockHelperMissing`
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
All helper calls will have access to `options.name` which is the first id value of the mustache operation.
As part of this the helperMissing call has been simplified to remove the indexed name in order to optimize the call. This is a breaking change.
Fixes #634
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Remove if conditional in favor of boolean failover.
|
|\
| |
| |
| |
| |
| |
| | |
blakeembrey-compiler-options
Conflicts:
lib/handlebars/compiler/javascript-compiler.js
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handlebars now supports subexpressions.
{{foo (bar 3)}}
Subexpressions are always evaluated as helpers; if
`3` were omitted from the above example, `bar`
would be invoked as a param-less helper, even
though a top-levell `{{bar}}` would be considered
ambiguous.
The return value of a subexpression helper is
passed in as a parameter of a parent subexpression
helper, even in string params mode. Their type,
as listed in `options.types` or `options.hashTypes`
in string params mode, is "sexpr".
The main conceptual change in the Handlebars code
is that there is a new AST.SexprNode that manages
the params/hash passed into a mustache, as well
as the logic that governs whether that mustache
is a helper invocation, property lookup, etc.
MustacheNode, which used to manage this stuff,
still exists, but only manages things like
white-space stripping and whether the mustache
is escaped or not. So, a MustacheNode _has_
a SexprNode.
The introduction of subexpressions is fully
backwards compatible, but a few things needed
to change about the compiled output of a template
in order to support subexpressions. The main one
is that the options hash is no longer stashed in
a local `options` var before being passed to
either the helper being invoked or the
`helperMissing` fallback. Rather, the options
object is inlined in these cases. This does
mean compiled template sizes will be a little
bit larger, even those that don't make use of
subexpressions, but shouldn't have any noticeable
impact on performance when actually rendering
templates as only one of these inlined objects
will actually get evaluated.
|
|\
| |
| | |
Allow any number of trailing characters for valid JavaScript variable
|
| | |
|
| |
| |
| | |
Fixes #656
|
| |
| |
| |
| | |
Fixes #166
Fixes #587
|
| | |
|
| |
| |
| |
| | |
Allows for stripping of the content after the fact.
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
Fixes #599
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
dist/handlebars.js
dist/handlebars.runtime.js
lib/handlebars/base.js
lib/handlebars/utils.js
|
| | |
|
| |
| |
| |
| |
| | |
At this point, I have only 2 fails in the Node build, but I'm doing a
bunch of manual stuff locally and still have a bunch of hacks.
|
| | |
|
|/ |
|
|
|