Alan Johnson
c54cadcf8f
Fixed strange stack issue.
2010-11-05 15:57:59 -04:00
Alan Johnson
82529f5051
Fixed issue where stack isn't passed into partials and also fixed null issue in complex expressions.
2010-11-05 13:56:27 -04:00
Alan Johnson
45c961afc8
Fixed memoization collision with built in methods. Thanks alphabj\!
2010-10-22 16:10:12 -04:00
Alan Johnson
198fa4b3c3
Getting rid of some debug output.
2010-10-13 16:42:44 -04:00
Alan Johnson
1d72f1bea4
Switched to using eval expression on basically all expressions.
2010-10-13 16:41:19 -04:00
Alan Johnson
295cfe5fd1
Fixed issue where using {{.}} as an expression could cause the fallback hash to be rendered instead, if {{.}} is empty.
2010-10-12 21:54:10 -04:00
Alan Johnson
7041b3a869
Got zero handling cleaned up a bit.
2010-10-12 21:43:48 -04:00
Alan Johnson
368f0210e2
Tweaked README.
2010-09-26 17:47:44 -04:00
Alan Johnson
4989f38ba2
Fixed bug where compiler was continuing to think it was looking at partials after the partial tag was done. Closes GH-14.
2010-09-26 17:18:57 -04:00
Alan Johnson
f288a75e39
Added compiler cache and got rid of TODO file.
2010-09-25 17:40:23 -04:00
Alan Johnson
88d0ea90fc
Switched empty block handling for expression blocks to use helperMissing.not.
2010-09-25 16:42:59 -04:00
Alan Johnson
c1bcd72eb1
Reworked the way that expression work a good bit. They're a lot less error prone now.
2010-09-24 22:26:10 -04:00
Jason Davies
a07dae5d8e
Fix disappearing backslash bug
...
Backslashes weren't being escaped during compilation, causing templates
containing backslashes to mysteriously lose them.
2010-09-23 02:24:00 +08:00
Alan Johnson
dab6729a37
More stack fixes. The context stack was being corrupted by nested blocks and expressions.
2010-09-22 14:04:26 -04:00
Alan Johnson
ee03e971f7
Fixed small context stack bug.
2010-09-22 13:42:55 -04:00
Jason Davies
03cadf8e76
Fix exception when context value is empty string
...
An exception was being thrown due to the empty string '' being treated
as a non-existent context value. When the empty string was encountered
as a nested value in the context it caused the fallback to be accessed
instead, and due to the non-existent nesting property it threw an
exception.
2010-09-20 11:52:55 +08:00
Alan Johnson
40e03aafee
Made the new mismatched blocks error message a little bit easier on the eyes.
2010-09-18 13:33:57 -04:00
Alan Johnson
2291a038d8
Added unmatched block tag detection.
2010-09-17 22:32:01 -04:00
Alan Johnson
e32ab0a527
Really need to write a pre-commit checker thingy that alerts me if console.log is anywhere in the code.
2010-09-16 08:14:07 -04:00
Alan Johnson
0f8593f163
Got empty blocks working.
2010-09-16 08:09:27 -04:00
Alan Johnson
3c5703630c
Got handleInvertedSection written up.
2010-09-14 20:42:16 -04:00
Alan Johnson
00abfd3164
Got handleExpression written up.
2010-09-14 20:37:03 -04:00
Alan Johnson
384ebf6373
Bundled up the block handling into a handleBlock function - means less code gen and more already jit-ed code, hopefully.
2010-09-14 08:03:54 -04:00
Alan Johnson
75a1aa4a0d
Added Handlebars.trim for IE compatibility.
2010-09-13 21:31:57 -04:00
Alan Johnson
281e45d6ba
Got carriage returns working.
2010-09-13 20:30:15 -04:00
Alan Johnson
ed5f10c282
Tweaked block helpers to wrap 'this' up in a context helper correctly.
2010-09-13 08:54:29 -04:00
Alan Johnson
a4a46bd8c3
Added creating exports if it doesn't already exist so non-CommonJS environments will work ok.
2010-09-11 21:00:06 -04:00
Alan Johnson
7ff015fd5d
CommonJS compatibility.
2010-09-11 18:24:50 -04:00
Alan Johnson
b4bac7f4f9
Firefox compatibility fixes.
2010-09-11 18:07:40 -04:00
Alan Johnson
2c3b97bb66
Got detecting Arrays working in firefox.
2010-09-11 09:48:17 -04:00
Alan Johnson
6f35bf4e83
Got rid of erroneous log message.
2010-09-11 09:37:54 -04:00
Alan Johnson
0c3a1cf477
Fixed isFunction to make it work with firefox [xpconnect wrapped native prototype]
2010-09-11 09:37:20 -04:00
James Conroy-Finn
7267f54521
Escape all double quotes when escaping a string
2010-09-10 19:38:04 +08:00
Alan Johnson
6bfff5f97b
Got helper functions to always receive a context as their first param.
2010-09-09 20:29:49 -04:00
Alan Johnson
40b1108b2e
Got expressions that are helpers with arguments working.
2010-09-09 20:13:08 -04:00
Alan Johnson
0767acc36c
Added a readme file and made a few fixes that were discovered while writing it.
2010-09-06 22:53:48 -04:00
Alan Johnson
1a8036650b
Added quick usage message to the compiler.
2010-09-06 09:56:08 -04:00
Alan Johnson
9770ffe4f3
Added compiler.
2010-09-05 17:36:14 -04:00
Alan Johnson
370fd4c165
Write a really dumb sample compiler.
2010-09-05 17:19:35 -04:00
Alan Johnson
2065af7af5
Partials performance improvement.
2010-09-05 15:48:19 -04:00
Alan Johnson
57455e23fd
Added basic performance test.
2010-09-05 03:44:04 -04:00
Alan Johnson
88e975d2b2
Got performance test stuff started.
2010-09-03 23:11:29 -05:00
Alan Johnson
222e810190
Got inverted blocks working.
2010-09-03 08:41:32 -05:00
Alan Johnson
598f333085
Got rid of some debugging output.
2010-08-18 20:57:42 -04:00
Alan Johnson
a9c875e0a9
Got basic inverted sections working.
2010-08-18 20:57:02 -04:00
Alan Johnson
2a112fe07f
Made progress on inverted sections. Functions almost work now, and expressions aren't far behind.
2010-08-17 00:46:04 -04:00
Alan Johnson
a04a8e792b
Got partials to cache inside of fallback/partials itself and added an exception for when partials aren't defined.
2010-08-15 16:21:49 -04:00
Alan Johnson
5bd5d4eed4
Fixed up an errant console.log.
2010-08-12 23:13:04 -04:00
Alan Johnson
ad6a53e277
Got escaping of text working, I think.
2010-08-12 23:12:26 -04:00
Alan Johnson
57aadef7c1
Added test for a partial inside of a partial.
2010-08-12 22:46:20 -04:00