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
wycats
8fccd21283
escapeExpressions should return "" for falsy values
2010-12-21 09:46:50 -08:00
wycats
e0246d7dfc
#each should handle undefined or null values
2010-12-21 09:46:22 -08:00
wycats
fc0d721b96
Use pluggable logger rather the puts
2010-12-21 09:45:59 -08:00
wycats
355565bb04
Fix missing whitespaces in error message
2010-12-21 09:39:05 -08:00
Zach Carter
faea35f8fa
Merging with latest master
2010-12-20 02:25:25 -05:00
wycats
8f502ffbe7
Add #each and #if built-in helpers for more readable iteration and conditionals
2010-12-19 00:06:55 -08:00
wycats
f4ae0c27fe
Allow reserved words to be used without slowing down most operations in browsers with faster foo.bar vs. foo['bar'].
2010-12-19 00:06:30 -08:00
wycats
b418ef6eb2
Add optimized compiled version of handlebars, which should be significantly faster. Use Handlebars.VM.compile instead of Handlebars.compile to use the optimized version.
...
Major TODOS:
* clean up a bunch of code duplication in the compiler
* reorganize the compiler
* add support for debug symbols which would make it possible
to provide information about what part of the source caused
a runtime error.
2010-12-18 23:27:34 -08:00
wycats
e15d675a64
Everything is working now on the new VM except for partials and inverse sections
2010-12-15 23:42:53 -08:00
Zach Carter
42414baa5c
Add new visitor.js file to build dependencies
2010-12-14 19:18:35 -05:00
Zach Carter
820504bbd5
Use 'spec' task instead of 'test'.
2010-12-14 19:10:41 -05:00
Zach Carter
97536f897e
Switch to Jison's lexer.
2010-12-14 19:07:05 -05:00
wycats
ec948c7382
Small restructuring. Have I mentioned how much I hate having to write modules that work in both CommonJS and the browser?
2010-12-12 13:33:17 -08:00
wycats
57e72c9fd2
Added build instructions
2010-12-11 19:44:11 -08:00
wycats
00fdfc306d
Add README
2010-12-11 19:42:04 -08:00
wycats
eefd0deb6d
Merge branch 'master' into rewrite
2010-12-11 19:11:56 -08:00
wycats
9fcd85bbac
Allow helperMissing to apply to simple mustaches (paves the way to support things like link_to in a Rails context)
2010-12-11 18:43:58 -08:00
wycats
62cea5b05e
Make sure rspec returns the right line number from library files
2010-12-11 18:29:05 -08:00
wycats
215754c268
Make helperMissing a built-in feature
2010-12-11 18:28:37 -08:00
wycats
5097c18912
Make it possible to register helpers and partials and then skip passing in the helpers or partials later
2010-12-11 18:10:56 -08:00
wycats
fdc8e425d0
Improve compiling infrastructure, and restore a bit of duplication in spec_helper to make debugging easier in test failures
2010-12-11 18:10:26 -08:00