tomhuda
a7bb51d8a5
DRY up some code that converts program AST nodes to opcodes.
2011-03-04 15:17:32 -08:00
tomhuda
357710f136
Add support for block hashes and clean up mustache/program code
2011-03-04 15:10:22 -08:00
tomhuda
ca9b9671a5
Add Hash arguments to simple mustaches (TODO: add Hash args to block helpers)
2011-03-04 00:11:03 -08:00
tomhuda
e0aa705f71
Add support for hash args in the tokenizer and parser
2011-03-03 21:33:28 -08:00
tomhuda
51d2543ba1
Add support for {{foo.bar.baz}}
2011-03-03 20:08:28 -08:00
Jason Davies
e5899cad1e
Test multi-backslash-escaping
2011-02-28 22:28:11 +00:00
Jason Davies
0397f875c5
Merge branch 'master' of http://github.com/wycats/handlebars.js
2011-02-28 22:23:11 +00:00
Jason Davies
2cf88d4e77
Fix backslash escaping
2011-02-28 22:23:02 +00:00
tomhuda
32d7e52182
Helpers take precedence over context properties with the same name. This is useful in scenarios where your context object is inherited from another system (such as a framework or JSON API) that may contain properties that conflict with helpers you explicitly define.
2011-02-25 23:01:11 -08:00
tomhuda
6fbdf4b445
Merge branch 'master' of github.com:wycats/handlebars.js
2011-02-25 22:36:49 -08:00
Jason Davies
0d4d8813ac
Merge branch 'master' of http://github.com/wycats/handlebars.js
...
Conflicts:
lib/handlebars.js
test/index.html
2011-02-21 01:51:31 +00:00
Alan Johnson
935053cc33
Added .DS_Store to gitignore.
2011-02-15 16:44:48 -05:00
tomhuda
2b319bef2f
Make the function passed to a block helper have an identical signature to top-level template methods
2011-02-14 16:05:01 -08:00
Bryan Woods
76e1bb4c06
Checks to see if jison is installed before attempting to run it in Rakefile
2011-02-13 12:37:08 -05:00
tomhuda
d7f93c09e7
Subclasses should be able to replace the compiler - this is needed so that child views are compiled using the updated semantics of the parent compiler
0.9.0.pre.4
2011-02-11 20:11:52 -08:00
tomhuda
299a0e81e3
data is passed to block helpers
2011-02-11 20:11:23 -08:00
tomhuda
e719f79259
Update Gemfile to use the released version of the ruby racer
2011-02-11 17:03:12 -08:00
tomhuda
88e7003331
* Added a few public API methods to JavaScriptCompiler.prototype, so it can be subclassed.
...
* made it possible to define an alternate name lookup scheme (so that {{foo}} does not have to be
context.foo, but can instead be something like context.get('foo'))
* made it possible to substitute an alternate buffer instead of the default empty String and override how
the compiled template appends to the buffer
* Added the concept of template-local data. In order to enable template-local data, pass true
as the second parameter to the template compiler. Then, pass in the data as the fourth
parameter (context, helpers, partials, data). These signatures may change before the 1.0 release.
2011-02-11 17:03:12 -08:00
Alan Johnson
2eb1b30870
Merge branch 'master' of github.com:wycats/handlebars.js
2011-02-10 06:27:12 -05:00
Alan Johnson
40dd2c9750
Updated if helper - missed it in the last cleanup. It no longer supports methods as arguments.
2011-02-10 06:27:03 -05:00
wycats
4362336656
Fix broken README information
2011-02-08 15:01:28 -08:00
wycats
aaaafb4400
Makes Handlebars work in contexts without a global object (node)
2011-02-08 14:31:09 -08:00
wycats
4d501b6613
Need to require timeout
2011-02-07 19:41:35 -08:00
wycats
0ea89d2c2c
Get specs up to snuff
2011-01-30 12:21:18 -08:00
Alan Johnson
ac4d34dbe3
Backed out function helpers.
2011-01-25 21:21:57 -05:00
Alan Johnson
e6b14fa934
Put null byte on content match instead of [^]
2011-01-25 21:13:39 -05:00
Alan Johnson
116a8a5202
Merge branch 'master' of https://github.com/gixug/handlebars.js into gixug-master
2011-01-25 19:59:34 -05:00
Alan Johnson
9349d6df0e
Added test for undefined blocks - didn't matter though.
2011-01-25 19:58:39 -05:00
David Stone
ea553b511b
IE 7 hates trailing commas
2011-01-25 10:24:53 -08:00
Raimonds Simanovskis
ada5a95f9c
improved "with" and "each" helpers to support function as argument
2011-01-23 11:55:48 +02:00
Alan Johnson
65b421ee4d
Merged
2011-01-22 10:30:44 -05:00
David Stone
dd4c03d0e3
IE doesn't like negated empty character classes.
...
Changing this to match the "dot" character class wouldn't work, though, because . doesn't match invisible whitespace like newlines, so we need to include those specifically.
2011-01-19 16:22:28 -08:00
Alex Stupka
8ab1ffae17
Use prototype toString method to avoid native types being returned.
...
* For example, mozilla returns [xpconnect native prototype wrapper] vs [object Function]
2011-01-17 15:42:27 -08:00
wycats
b7c649617b
noop should return an empty String, not undefined
2011-01-11 23:16:03 -08:00
wycats
fa5853079f
arrrrg
2011-01-10 16:00:09 -08:00
wycats
ce1ed0dc4a
Fix for shitty JS regex engines.
2011-01-10 15:47:11 -08:00
Alan Johnson
354d61d3c8
Updating gitignore to ignore .rvmrc files.
2010-12-29 22:48:51 -05:00
wycats
1974aa5277
If the partial is not found, an exception should be thrown
2010-12-29 19:23:23 -08:00
wycats
c19f06b4ee
Updated semantics
2010-12-29 19:20:03 -08:00
wycats
e20c57c9b2
Move compile to the right spot
2010-12-29 19:09:55 -08:00
wycats
5170e1459f
Don't need runtime anymore for normal operation
2010-12-29 18:34:13 -08:00
wycats
bf6c74aa83
Restructure things more simply
2010-12-29 18:21:43 -08:00
wycats
9e77799e87
Housekeeping
2010-12-28 15:49:08 -08:00
wycats
9a1d7c018d
Make {{#if foo}} handle empty Arrays
2010-12-28 15:47:15 -08:00
wycats
79f6b35258
Add benchmarks
2010-12-28 15:47:03 -08:00
wycats
0da3065987
Clean up after-effects of Jison fix
2010-12-28 15:46:26 -08:00
Raimonds Simanovskis
b319730031
improved "if" helper to support function as argument
2010-12-28 13:37:42 +02:00
wycats
72fa62529e
Merge branch 'master' of https://github.com/zaach/handlebars.js into zaach-master
2010-12-27 13:02:20 -08:00
wycats
16ed2cd3f1
Refactoring and performance enhancements on the VM compiler
2010-12-21 09:47:27 -08:00
wycats
d87ae129c0
Add a #with helper
2010-12-21 09:47:01 -08:00