| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The root cause of #1218 is that `invokePartial` creates a stack of data frames
for nested partial blocks, but `resolvePartial` always uses the value at top of
the stack without "popping" it. The result is an infinite recursive loop, as
references to `@partial-block` in the partial at the top of the stack resolve to
itself.
So, walk up the stack of data frames when evaluating. This is accomplished by
1) setting the `partial-block` property to `noop` after use and
2) using `_parent['partial-block']` if `partial-block` is `noop`
Fix #1218
|
|
|
|
|
|
| |
The use of arrays was incorrect for the data type and causing problems when hash keys conflicted with array behaviors.
Fixes #1194
|
|
|
|
| |
Fixes #1186
|
|
|
| |
Fixes #1151
|
|
|
|
|
| |
Users can utilize the UMD library if they are still using require.js and if they need to have specific modules, they can consume the cjs or es6 modules via webpack or similar.
Fix for #1096
|
|\ |
|
| |
| |
| | |
The tests are run through the transpiler and just reverting the user of template literal is easier than adding transpiler to the test stack.
|
| |
| |
| |
| | |
Fixes #1135
|
| |
| |
| | |
These were a bad idea to begin with and without the trackIds implementation they don’t make much sense.
|
| |
| |
| |
| | |
Closes #1145
|
| | |
|
|/ |
|
|
|
|
| |
quoting partial name
|
| |
|
|
|
| |
Fixes #1099
|
| |
|
|
|
|
|
| |
Allow for iteration on undefined values, but special case undefined and null to prevent rendering errors when not running in strict mode.
Fixes #1093
|
|
|
|
|
|
|
|
| |
Allows for ] literal characters to be used within [] IDs by prefixing them with the \ character. `\` literal at the end of the may be referenced by the `\\` sequence if conflicting. Under most circumstances the `\\` sequence will continue to work.
Potentially breaking change for users of [] ids that have `\\` anywhere in the id or `\` at the end of the id.
Fixes #1092
|
|
|
|
|
| |
If a decorator is used within a partial but not in the calling template, the hash is not passed in. For now error on the side of always including as just assigning values has minimal overhead.
Fixes #1089
|
| |
|
| |
|
| |
|
|
|
|
|
| |
There was a potential XSS exploit when using unquoted attributes that this should help reduce.
Fixes #1083
|
| |
|
|
|
| |
Fixes #1032
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Allows for partials to be defined within the current template to allow for localized code reuse as well as for conditional behavior within nested partials.
Fixes #1018
|
| |
| |
| |
| | |
These allow for a given block to be wrapped in helper methods or metadata and allow for more control over the current container and method before the code is run.
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
This allows for failover for missing partials as well as limited templating ability through the `{{> @partial-block }}` partial special case.
Partial fix for #1018
|
|
|
|
|
| |
These were little more than object literal statements that were less clear due to their use of index-based arguments.
Fixes #1077
|
|
|
| |
There is no real need for us to do `.call(container` other than for backwards compatibility with legacy versions. Using the 4.x release as a chance to optimize this behavior.
|
| |
|
|
|
| |
This covers all of the test cases and generally have better stack traces so we want to have these featured more prominently.
|
| |
|
|
|
| |
Fixes #1072
|
|
|
| |
Fixes #1065
|
|
|
| |
Fixes #1071
|
| |
|
| |
|
|
|
| |
Load templates and then parse them in a distinct operation. This will allow us to use other input sources such as stdin and strings.
|
| |
|
|
|
|
|
| |
Avoid undefined values and potential false positives from other type values such as partials.
Fixes #1055
|
| |
|
| |
|
|
|
|
|
| |
Certain optimizations for simple templates could result in objects returned by helpers returned rather than their string representation, resulting in some odd edge cases. This ensures that strings are always returned from the API for consistency.
Fixes #1054.
|
|
|
|
|
| |
This allows for `{{helper foo}}` to still operate under strict mode when `foo` is not defined on the context. This allows helpers to perform whatever existence checks they please so patterns like `{{#if foo}}{{foo}}{{/if}}` can be used to protect against missing values.
Fixes #1063
|
|
|
|
|
|
|
| |
Creating a new depth value seems to confuse users as they don’t expect things like `if` to require multiple `..` to break out of. With the change, we avoid pushing a context to the depth list if it’s already on the top of the stack, effectively removing cases where `.` and `..` are the same object and multiple `..` references are required.
This is a breaking change and all templates that utilize `..` will have to check their usage and confirm that this does not break desired behavior. Helper authors now need to take care to return the same context value whenever it is conceptually the same and to avoid behaviors that may execute children under the current context in some situations and under different contexts under other situations.
Fixes #1028
|
|
|
| |
Fixes #914
|
| |
|
| |
|
|
|
|
|
|
|
| |
Adds multiple variable support and the ability to set statement level logging semantics.
This breaks that logger API, cleaning up the manner in which enums are set, but the other behaviors are backwards compatible.
Fixes #956
|
| |
|
|
|
| |
Fixes #1021
|
|
|
|
| |
Fixes #1042
|
|
|
|
| |
The ‘ character would cause invalid javascript to be generated as it was not properly escaped. Switching to JSON.stringify safely handles all potential unescaped cases.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
There appears to be a bug in our use of jison causing the parent location information to be reported to programs. I wasn’t able to work through what might be causing this so instead using the location information of the statements collection to generate the proper location information.
This is a bit of a hack but we are very far behind on the Jison release train and upgrading will likely be a less than pleasant task that doesn’t provide us much benefit.
Fixes #1024
|
|\
| |
| | |
Fixes typo in tests
|
| |
| |
| | |
mutache => mustache
|
|/
|
|
| |
Fixes #1013
|
|
|
|
|
| |
There is two consecutive tests with the same input data: "{{ foo bar \'baz\' }}"
I suppose the first test should be about testing double quoted string.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions.
Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules.
Fixes #855
Fixes #993
|
| |
|
|
|
| |
Fixes #967
|
| |
|
|
|
|
|
| |
This adds the UndefinedLiteral and NullLiteral to AST.
Fixes #990
|
|
|
| |
Fixes #989
|
|
|
| |
Adds test coverage for #989
|
|
|
| |
Adds support for literal helper names in a few missing cases such as block expressions and subexpressions.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
This improves logger resiliency under older browsers.
|
|
|
|
|
|
| |
Eventually we want to fix this API so that you can provide per-instance levels, etc but for now this is a quick fix.
Fixes wycats/handlebars-site#91
|
|
|
|
|
| |
This allows us to avoid creating unnecessary AST nodes and avoids things like isHelper.
Side effect of these changes is that @data functions can now have data parameters passed to them.
|
|
|
|
|
|
|
|
|
| |
Uses the subexpression syntax to allow for dynamic partial lookups. Ex:
```
{{> (helper) }}
```
Fixes #933
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* await
* null
* true
* false
IE 8 was failing to compile Handlebars-generated source code
because it had helpers.null.
I came up with this list by diffing
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords
against the ones Handlebars already had.
I added two corresponding tests for nameLookup.
|
|\
| |
| | |
Implement strict and assumeObject modes
|
| |
| |
| |
| |
| |
| |
| |
| | |
Causes templates to throw when lookup fields are not defined within the context. Strict mode will throw when any field is omitted. assumeObjects mode maintains the existing behavior of outputting an empty response when fields are not defined but allows for performance/size optimizations by not doing safety checks for intermediate objects in the lookup chain.
Strict mode effectively disables the helperMissing and inverse handling for blockHelperMissing as templates will throw rather than call those features for missing data fields.
Fixes #651
Fixes #805
|
|\ \
| |/ |
|
| | |
|
| | |
|
|/
|
| |
Fixes #916
|
| |
|
|
|
| |
Fixes #907
|
|
|
|
|
| |
Fixes a very specific error case where deduped children won’t receive the depths object due to it being omitted by the caller when optimizing.
Fixes #926
|
|
|
|
| |
elsewere
|