kpdecker
768ddbd661
Use objects for hash value tracking
...
The use of arrays was incorrect for the data type and causing problems when hash keys conflicted with array behaviors.
Fixes #1194
2016-03-11 22:16:18 -06:00
Charles O'Farrell
c7be766902
Ensure that existing blockParams and depths are respected on dupe programs
...
Fixes #1186
2016-03-08 07:23:45 +11:00
kpdecker
118836f390
Throw exception if id tracking args are passed
...
Fixes #1151
2015-12-26 18:49:28 -06:00
kpdecker
63fdb92472
Drop extra Error params
...
This was causing a difficult to diagnose failure under IE and doesn’t give us enough value to justify the change.
2015-12-14 02:24:06 -06:00
kpdecker
326734b0f3
Exclude coverage check in exception conditional
2015-12-12 16:14:17 -06:00
kpdecker
2ea6119a83
Fix throw when creating exception object in Safari
...
https://github.com/jquery/esprima/issues/1290
2015-12-12 16:07:52 -06:00
kpdecker
25458fdc2a
Relax depth check for context push
...
Fixes #1135
2015-12-12 15:27:56 -06:00
kpdecker
63a08890cc
Remove semi-documented _setup and _child APIs
...
These were a bad idea to begin with and without the trackIds implementation they don’t make much sense.
2015-12-12 15:27:26 -06:00
machty
3f77b82ed0
Remove stringParams and trackIds mode
...
Closes #1145
2015-12-10 14:22:45 -05:00
kpdecker
205c61cfb1
v4.0.5
2015-11-19 23:06:54 -06:00
kpdecker
685cf92bcb
Return current handlebars instance from noConflict
...
Fixes wycats/handlebars-site#131
2015-11-19 22:58:26 -06:00
kpdecker
9f59de9657
Fix lint errors under latest eslint
2015-10-31 13:32:43 -05:00
kpdecker
b7c95e9feb
v4.0.4
2015-10-29 01:54:17 -05:00
Mark Christian
33b53ef989
Use template string ✨ for error message and double-quotes for quoting partial name
2015-10-19 09:44:53 -07:00
Mark Christian
f08d48764d
Include partial name in 'undefined partial' exception message
2015-10-19 09:22:54 -07:00
kpdecker
9365b82900
v4.0.3
2015-09-23 22:41:14 -05:00
kpdecker
94c840b6ed
Create data frame for @partial-block
...
Fixes #1099
2015-09-23 22:08:59 -05:00
kpdecker
861d6f7b8d
Fix tests under IE
2015-09-23 21:59:58 -05:00
kpdecker
fffb5a985f
Fix iteration over undefined values
...
Allow for iteration on undefined values, but special case undefined and null to prevent rendering errors when not running in strict mode.
Fixes #1093
2015-09-23 21:17:57 -05:00
kpdecker
a5a3ab01d3
v4.0.2
2015-09-04 09:13:16 -05:00
kpdecker
7b1fdf814c
Fix use of decorators within partials
...
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
2015-09-04 09:09:17 -05:00
kpdecker
c7b28a65da
v4.0.1
2015-09-02 21:21:36 -05:00
kpdecker
05b82a203e
Fix failure when using decorators in partials
2015-09-02 20:43:54 -05:00
kpdecker
0aef72cb8e
Update to latest eslint
2015-09-01 17:56:32 -05:00
kpdecker
bff5fab8f9
v4.0.0
2015-09-01 08:19:14 -05:00
kpdecker
83b8e846a3
Escape = in HTML content
...
There was a potential XSS exploit when using unquoted attributes that this should help reduce.
Fixes #1083
2015-09-01 01:44:35 -05:00
kpdecker
b0d217e13d
Rev runtime compiler revision
2015-09-01 01:43:00 -05:00
kpdecker
b63d74a7b3
Add explicitPartialContext compiler flag
...
Fixes #1032
2015-09-01 01:05:00 -05:00
kpdecker
e7a64f018c
Merge branch 'decorators'
2015-09-01 00:48:20 -05:00
Dennis Kuczynski
7c896a074d
Fix #each when last object entry has empty key
2015-08-30 10:43:24 -04:00
kpdecker
6c45f49b24
Implement decorator helper method
2015-08-22 11:13:08 -07:00
kpdecker
495cd05a7e
Implement inline partials
...
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
2015-08-22 11:13:08 -07:00
kpdecker
452afbf2ff
Implement block decorators
...
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.
2015-08-22 10:59:34 -07:00
kpdecker
408192ba9f
Add decorator parsing
2015-08-22 10:59:34 -07:00
kpdecker
2a4a5447f5
Implement decorator environment and registration
2015-08-22 10:59:34 -07:00
kpdecker
0b5e82e1c3
Add whitespace control to partial block statements
2015-08-22 10:59:08 -07:00
kpdecker
233caf3f7c
Create validateClose helper method
...
Avoid duplicating the logic needed to check for close block mismatches.
2015-08-22 10:59:08 -07:00
kpdecker
91ffd32cad
Implement partial blocks
...
This allows for failover for missing partials as well as limited templating ability through the `{{> @partial-block }}` partial special case.
Partial fix for #1018
2015-08-22 10:59:08 -07:00
kpdecker
2571dd8e8e
Improve sanity checks in compiler and visitor
2015-08-22 10:58:44 -07:00
kpdecker
95d84badca
Drop AST constructors in favor of JSON
...
These were little more than object literal statements that were less clear due to their use of index-based arguments.
Fixes #1077
2015-08-18 23:57:27 -07:00
kpdecker
9a2d1d6009
Pass container rather than exec as context
...
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.
2015-08-18 23:54:04 -07:00
kpdecker
08093d72f0
Remove unused parameters
2015-08-18 23:14:09 -07:00
kpdecker
ea3a5a1eb6
Add ignoreStandalone compiler option
...
Fixes #1072
2015-08-13 01:51:17 -05:00
kpdecker
06d515a89d
Ignore empty when iterating on sparse arrays
...
Fixes #1065
2015-08-04 12:40:33 -05:00
kpdecker
93b07605cd
Bulletproof AST.helpers.helperExpression
...
Avoid undefined values and potential false positives from other type values such as partials.
Fixes #1055
2015-08-03 20:31:57 -05:00
kpdecker
85750f8d0a
Use += in printer
2015-08-03 18:51:46 -05:00
kpdecker
324d615726
Enforce 100% code coverage
2015-08-03 17:49:47 -05:00
kpdecker
c3cbaa25a4
Fix partial handling with different context
2015-08-03 17:27:38 -05:00
kpdecker
8e868ab225
Always return string responses
...
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 .
2015-08-03 16:08:23 -05:00
kpdecker
5d4b8da344
Pass undefined fields to helpers in strict mode
...
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
2015-08-03 15:59:53 -05:00