Yehuda Katz
17ee7ffaca
Merge pull request #388 from dmarcotte/empty-inverse-blocks
...
Allow empty blocks around simple inverses
2012-12-23 20:31:46 -08:00
Yehuda Katz
bf4c813db0
Merge pull request #389 from leshill/partial_names
...
Partials can be paths
2012-12-23 20:29:36 -08:00
Yehuda Katz
070e12f76f
Merge pull request #390 from eastridge/master
...
Make {data: true} a default compile option
2012-12-23 20:21:36 -08:00
Yehuda Katz
9385666e08
Get a better error for compile(falsy)
2012-12-23 20:15:18 -08:00
Les Hill
b58c2dd0ad
Test for #84
2012-12-13 11:15:38 -08:00
Les Hill
4bb794d814
Partials can be paths
...
Allows partials with slashes, a common partial syntax. For example:
{{> shared/dude}}
2012-12-13 11:15:38 -08:00
Ryan Eastridge
7ce13a3c2c
Add failing unit test for private variables
2012-12-12 18:10:18 -08:00
Daniel Marcotte
4cfda479fa
Allow empty blocks around simple inverses
...
Previously, the parser required at least one character of whitespace
to properly interpret empty blocks around simple inverses, which was
non-intuitive and inconsistent with empty block parsing.
Update the parser to allow empty blocks around simple inverses.
2012-12-11 09:47:49 -08:00
Peter Wagenet
39832c0633
Fix handling of Errors in Chrome
2012-11-02 10:39:49 -07:00
Yehuda Katz
a927a9b0ad
Add block comment syntax:
...
{{!-- can contain
{{handlebars expressions}} --}}
2012-10-15 13:51:53 -04:00
Mike Petrovich
d89e4b3d33
Added unit tests for #each with objects
2012-10-15 10:27:58 -04:00
Yehuda Katz
850304f43b
Merge pull request #295 from leshill/escaped_quotes
...
Escaped quotes in hash arguments
2012-10-12 23:38:18 -07:00
Les Hill
a1c9acb8b1
Escaped single quotes in hash arguments
2012-09-22 08:09:33 -07:00
Tyson Tate
42120d1177
Bind functions to the context properly.
...
The regression was introduced in 1.0.rc.1.
This fixes issue #317 .
2012-09-19 16:03:46 -07:00
Yehuda Katz
26b1438f20
Merge pull request #198 from codekitchen/master
...
properly handle ampersands when HTML escaping
2012-09-14 20:48:40 -07:00
Yehuda Katz
b83e5e0ea6
Merge pull request #297 from karlwestin/fix-reverse-array
...
Fixed an issue where {{#array}} {{/array}} wouldn't pass in an @index data variable
2012-09-14 20:26:11 -07:00
kpdecker
aba2269ddb
Add nested hyphen test cases
2012-09-13 17:51:12 -05:00
tomhuda
5a6e4f1ddd
Fix repeated delimiter escaping
2012-09-12 20:44:48 -07:00
Karl Westin
acc04c2826
Fixed an issue where {{#array}} {{/array}} wouldn't pass in an
...
@index data variable.
I just thought it would be nice to add in this feature. I'm using
the two of these a little interchangable, so if other people are doing
that as well, it might help usability.
2012-08-27 12:55:55 -07:00
kpdecker
dc0426d836
Merge with upstream/master
2012-08-21 12:49:40 -05:00
Les Hill
9ce3032678
Recognize bar='baz' hash argument
2012-08-14 23:12:22 -07:00
kpdecker
d8825b1961
this parameter tests
2012-07-30 21:12:03 -05:00
kpdecker
eb509a4b8b
Execute mocha test from npm test
2012-07-23 13:47:52 -05:00
kpdecker
09ac8ac24b
Make jshint happy(er)
2012-07-23 13:45:53 -05:00
kpdecker
adb8486e5f
Use suite rather than module for module decl
2012-07-23 13:44:45 -05:00
Yehuda Katz
efb1e25690
Update for change in TRR API
2012-07-12 08:15:10 -07:00
Yehuda Katz
46c04fa71e
Make deep @data trigger the data option
2012-07-05 23:05:55 -07:00
Yehuda Katz
72e05d623c
Add support for @data variables
2012-07-05 22:43:05 -07:00
tomhuda
0afc8b58d2
Clean up parser tests and AST printer
2012-05-28 19:06:26 -07:00
tomhuda
175c6fae0f
More cleanup
...
* Make block and inverse use the main helper path
* Eliminate separate inverse AST node
2012-05-28 17:00:41 -07:00
Yehuda Katz
8786a6c6e2
Start doing earlier work on helpers
2012-05-28 00:15:52 -07:00
Yehuda Katz
246325085f
Simple spec for isolation analysis
2012-05-26 22:17:31 -07:00
tomhuda
facefe8fed
Several improvements to compiled output:
...
* Eliminate legacy support for an options hash
that doubles as a function. This prevented us
from building the hash as a literal, and added
a bunch of code weight
* Create a new "stack literal" construct, that
allows an opcode to push a literal expression
onto the stack. This will not allocate a new
stack variable, and when popped, will simply
return the literal expression as a String.
2012-05-26 14:51:41 -07:00
Brian Palmer
bd9a84a0b7
properly handle amperstands when HTML escaping
...
escapeExpression, when given a string like ">", was simply returning
">", not escaping the amperstand. This is incorrect, and makes it
impossible to have Handlebars properly escape a
string like "Escaped, <b> looks like: <b>"
If the intention of the user is to not escape these characters, then
{{{}}} or {{&}} should be used
2012-02-29 11:25:51 -07:00
Yehuda Katz
730c2617af
Differentiate between lambdas in the context (which should have mustache semantics) and helpers (which have Handlebars helper semantics).
2011-12-31 13:51:54 -08:00
Yehuda Katz
757d5250dc
Rename "vm" to "runtime" for clarity
2011-12-27 18:15:44 -08:00
Yehuda Katz
c79c761460
Add support for escaping mustaches
2011-12-27 17:04:59 -08:00
Yehuda Katz
e474e56b80
data should be passed through to partials. closes #111 .
2011-12-27 15:57:08 -08:00
Yehuda Katz
69307d0e2b
Allow function parameters to #if. This was originally disallowed because it is decidedly not idiomatic Handlebars, which would prefer that you use helpers for these cases, not pollute your context objects with functions to call from your template, but enough people asked for it that I'll give in.
...
I will personally not be using this feature and still strongly recommend that people use helpers in this case.
2011-12-27 15:47:45 -08:00
Yehuda Katz
373d10edb1
Literal square-bracket path segments cannot have ] in them. TODO: Allow escaped path segments.
2011-12-27 01:21:53 -08:00
Yehuda Katz
bd0f74fbd9
Test that the hello world mustache example works
2011-12-27 00:43:30 -08:00
Yehuda Katz
e57e626480
Fix bug where inverse section was being passed to subsequent helpers
2011-12-27 00:30:46 -08:00
Peter Wagenet
43431d2a78
Added 'log' helper - See #97
2011-10-24 19:41:41 -07:00
Peter Wagenet
b36776f4c6
Better errors for 'equals' test
2011-10-24 19:12:54 -07:00
Alan Johnson
6b18873d23
Fixed errors occurring because of undefined properties on nested paths.
2011-09-02 10:56:37 -04:00
Alan Johnson
c1c455acc8
Reproduced undefined property error.
2011-09-02 10:47:05 -04:00
Alan Johnson
f2f1f5f9bd
Wrote a quick test for partials with literal paths.
2011-09-02 10:36:59 -04:00
Alan Johnson
7212e2b7d7
Got more complex literal expressions working.
2011-09-02 09:10:20 -04:00
Alan Johnson
fc84308cc9
Got simple literal expressions added into paths.
2011-09-02 09:04:41 -04:00
kpdecker
f53737ef23
knownHandlers and knownHandlersOnly compile options.
2011-07-31 21:00:44 -05:00