kpdecker
0af54b1142
Use extend rather than prototype for createFrame
...
Using prototype has a large performance impact for the common case of a
sparse set of private variable data points. Rather than incurring the
overhead of creating and walking the prototype tree for this, performing
an extend by copy.
2013-08-24 12:10:10 -05:00
Tuomas Palenius
db47593e34
Fix #597 . If-helper doesn't anymore consider 0 as falsy value.
2013-08-15 06:05:11 +03:00
kpdecker
f63b226b76
Update to 1.0.0 final
2013-05-31 14:16:45 -04:00
kpdecker
16fd601a5c
Merge global and passed helpers and partials
2013-05-31 13:12:06 -04:00
kpdecker
c540d7186a
Allow function arguments to with and each
...
Via @mcdan
Fixes #239
2013-05-29 12:23:55 -04:00
kpdecker
293672432b
improve error message on missing helper
...
Via @stefanpenner
Fixes #523
2013-05-29 10:57:48 -04:00
kpdecker
533be694b5
Use better variable name
2013-05-21 13:12:11 -05:00
kpdecker
ddc4d31861
Rev to rc4
2013-05-13 23:07:29 -05:00
kpdecker
4429ffa9f3
Allow multiple partial and helper registration
...
Fixes #369
2013-04-07 18:04:51 -05:00
kpdecker
0329c852bd
Merge branch 'program-metadata'
2013-04-07 12:29:54 -05:00
Kevin Decker
21977633a0
Merge pull request #213 from thejohnfreeman/master
...
Block helper "with" should check for empty context
2013-03-13 19:54:26 -07:00
kpdecker
baccdb4cfc
Add program metadata
...
Include program id and depth on the generated wrapper objects. This
allows helpers who are passed these objects to differentiate between
helpers for cases where they may want to cache the generated DOM
structure.
2013-02-17 04:27:42 -06:00
kpdecker
c95b3d6fc5
Create new options object for unless nesting
...
Fixes #343
2013-02-16 16:18:48 -06:00
kpdecker
1f76b065fc
browser-prefix/suffix templates
2013-02-16 13:07:39 -06:00
kpdecker
e3454a0187
Restore module scope in base.js
2013-02-15 19:41:10 -06:00
kpdecker
f72cbed479
Merge branch 'master' of github.com:tommydudebreaux/handlebars.js into tommydudebreaux-master
2013-02-15 19:24:15 -06:00
Peter Wagenet
bc8214cb7c
Updated to 1.0.0-rc.3
2013-02-14 21:58:20 -08:00
Tommy Messbauer
7f9e3fea81
tests passing
2013-02-11 23:13:37 -06:00
Tommy Messbauer
1ca7462497
merge
2013-02-11 23:00:47 -06:00
Peter Wagenet
7c633b604d
Better error messages for precompiler runtime mismatch
2013-02-09 19:25:53 -08:00
Peter Wagenet
51e9259fac
Decouple compiler version checks from release versions
2013-02-08 18:42:20 -08:00
tomhuda
9453c6d9d2
Update version
2013-01-18 17:13:40 -08:00
Tommy Messbauer
db975b42a0
Merged upstream master and ran unit tests
2012-11-26 10:26:15 -06:00
Tommy Messbauer
7963218495
Factory update with tabs to spaces.. sorry :(
2012-11-26 09:39:08 -06:00
Spike Brehm
2676efb222
overzealous approach to implmenting Handlebars.logger.log and 'log' helper.
2012-10-20 15:26:57 -07:00
Ross Hadden
9589ab8949
Implemented ability to iterate over objects, ala for-in.
...
Also added the 'key' key to looped objects.
My goal is to make this {{@key}}, but am still working on it.
I would also like to unobtrusively make @key or @index work for arrays.
2012-10-15 10:27:56 -04:00
Tommy Messbauer
7c4813b417
Commiting initial factory code
2012-08-29 12:48:22 -05: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
fc99d90337
Fix loading under node
2012-07-23 13:48:27 -05:00
tomhuda
f79af6bfa3
Merge branch 'master' of github.com:wycats/handlebars.js
2012-07-12 10:07:10 -07:00
Yehuda Katz
5e8be14d78
Add support for @index in #each
2012-07-05 22:43:50 -07:00
tomhuda
92b6c1401a
Bump version to RC1
2012-05-28 20:05:55 -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
tomhuda
24e04bad94
JSHint the library and fix a few bugs
2012-02-17 16:51:35 -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
Alex Sexton
8338bc888a
Update the version!
2011-11-30 02:06:49 -06:00
Peter Wagenet
43431d2a78
Added 'log' helper - See #97
2011-10-24 19:41:41 -07:00
kpdecker
5e611205ac
Create compiler base file.
2011-07-30 10:38:36 -05:00
kpdecker
034dafddac
Move parser file into compiler subdir
2011-07-30 10:14:59 -05:00
tomhuda
059a80661d
* Remove legacy support for inverse sections as additional parameters.
...
* Unify inverse and normal block helpers
* Make Handlebars.Exception inherit from JS Error
2011-07-07 23:09:33 -07:00
Alan Johnson
37e36bf137
Merge pull request #66 from rgrove/fix-empty-array-if
...
The "if" block helper shouldn't treat empty arrays as truthy
2011-06-27 03:15:50 -07:00
tomhuda
60040e60fb
Update specs and code so that the function passed to block helpers has the same API as regular compiled templates
2011-05-04 00:03:50 -07:00
tomhuda
81071dd22c
Add VERSION constant
2011-05-03 20:39:24 -07:00
tomhuda
d83e1c7484
Remove unnecessary original runtime implementation
2011-05-03 20:38:06 -07:00
tomhuda
2615fa4bd1
Add a default helperMissing to help catch errors and restore old behavior
2011-05-03 19:30:32 -07:00
Ryan Grove
dec196b4d9
The "if" block helper shouldn't treat empty arrays as truthy.
...
Given the data {foo: []}, the following template previously considered
foo to be truthy when it shouldn't have:
{{#if foo}}
You should not see me!
{{else}}
You should see me!
{{/if}}
2011-04-20 16:56:37 -07:00
Tim Fischbach
a1b1b160cf
inserting missing return statement in unless helper (fixes issue #51 )
2011-03-09 11:51:00 +01:00