Yehuda Katz
36b242a710
Document lookupData
2012-07-05 23:10:39 -07:00
Yehuda Katz
659be5a690
Reduce duplication
2012-07-05 23:08:57 -07:00
Yehuda Katz
46c04fa71e
Make deep @data trigger the data option
2012-07-05 23:05:55 -07:00
Yehuda Katz
5e8be14d78
Add support for @index in #each
2012-07-05 22:43:50 -07:00
Yehuda Katz
72e05d623c
Add support for @data variables
2012-07-05 22:43:05 -07:00
Nicolas Chambrier
7a393a972b
FIX global leak
2012-06-25 17:38:27 +03:00
tomhuda
92b6c1401a
Bump version to RC1
2012-05-28 20:05:55 -07:00
tomhuda
0afc8b58d2
Clean up parser tests and AST printer
2012-05-28 19:06:26 -07:00
tomhuda
1082ec2414
Fix a bug where registers were shared
2012-05-28 19:06:08 -07:00
tomhuda
727eb26cb6
Remove unneeded code and add docs
...
There were a few operations that are no longer
needed, so remove them. Also document all
operations.
2012-05-28 17:35:21 -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
tomhuda
3486b530be
Disambiguate more ahead of time
2012-05-28 14:19:48 -07:00
tomhuda
bc5efc1767
Remove unneeded binary opcode stuff
...
It turns out that we don't need to store the
opcodes in a compact way, so don't bother.
2012-05-28 13:28:51 -07:00
Yehuda Katz
90adaa3cc8
Continue work on cleaning up helpers
2012-05-28 13:03:22 -07:00
Yehuda Katz
8786a6c6e2
Start doing earlier work on helpers
2012-05-28 00:15:52 -07:00
Yehuda Katz
68c76c9b2e
Clean up the compiler a bit
2012-05-26 22:17:22 -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
tomhuda
8e70e3b58b
Don't assume execution in the top context
2012-05-26 14:47:32 -07:00
Peter Wagenet
2418feaf19
Wrap base Handlebars in a closure to prevent var leakage - fixes #205
2012-05-04 15:27:50 -07:00
John Freeman
0872fb6699
block helper "with" should check for empty context
2012-03-31 23:09:27 -05: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
tomhuda
24e04bad94
JSHint the library and fix a few bugs
2012-02-17 16:51:35 -08:00
Peter Wagenet
2ea95ca08d
Fixed whitespace and semi-colons
2012-02-08 20:49:49 -08:00
Nick Fisher
58e2c2410f
Added a missing var statement.
2012-01-17 07:16:19 +01:00
Yehuda Katz
6040149cf8
I'm an idiot
2011-12-31 16:04:11 -08:00
Yehuda Katz
17cdb0091b
Missing some reserved words
2011-12-31 15:41:16 -08: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
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
9852502636
Bump version
2011-12-27 13:34:37 -08:00
Yehuda Katz
7a0bf9d332
Handlebars errors should copy the message over
2011-12-27 13:18:54 -08:00
Yehuda Katz
e57e626480
Fix bug where inverse section was being passed to subsequent helpers
2011-12-27 00:30:46 -08:00
Yehuda Katz
647d5adf85
Merge pull request #121 from tablatom/master
...
Added a noEscape option to Handlebars.compile
2011-12-23 16:57:39 -08:00
Alex Sexton
8338bc888a
Update the version!
2011-11-30 02:06:49 -06:00
Yehuda Katz
9998d9d9bc
Allow subclasses to customize the namespace
2011-10-28 17:39:42 -07:00
Peter Wagenet
924cc3e86c
Goodbye poor hack. You were broken before your time.
2011-10-27 22:32:07 -07:00
Peter Wagenet
43431d2a78
Added 'log' helper - See #97
2011-10-24 19:41:41 -07:00
kpdecker
defc2f3403
Refactor deferred compile to use helper
2011-10-21 08:34:24 -05:00
kpdecker
4458b5fa13
Defer compilation of templates until needed.
2011-10-21 08:24:55 -05:00
Tom Locke
cd927e9cda
Add noEscape option to Handlebars.compile
2011-09-26 09:47:30 +01:00
Alan Johnson
b832c85923
Forgot === for falsy check.
2011-09-05 14:20:57 -04:00
Alan Johnson
33bde69750
Fixed bug in falsy check on lookups.
2011-09-05 11:08:22 -04:00
Alan Johnson
6b18873d23
Fixed errors occurring because of undefined properties on nested paths.
2011-09-02 10:56:37 -04:00
Alan Johnson
fc84308cc9
Got simple literal expressions added into paths.
2011-09-02 09:04:41 -04:00
Mark DiMarco
696dc2dc36
The missing semicolon is breaking our code when we minify.
2011-09-01 20:37:51 -05:00
Alan Johnson
3c5cac3f3f
Fixed missing var in compiler code causing compilerWords to be global.
2011-08-15 23:10:27 -04:00
tomhuda
2f7b724d5a
Make sure options.hash is an empty {} if no hash is present to eliminate necessary guards in helpers
2011-08-02 16:32:57 -07:00
kpdecker
318c08a97e
Do not perform unnecessary self-assign
2011-07-31 21:44:27 -05:00
kpdecker
d6b97cf34d
Do not buffer for simple programs (1 statement)
2011-07-31 21:44:16 -05:00