Commit Graph

54 Commits

Author SHA1 Message Date
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 50e2034d54 Test cleanup. 2010-09-22 14:07:02 -04:00
Alan Johnson 81d45426e7 Merge branch 'master' of github.com:wycats/handlebars.js 2010-09-22 14:06:37 -04:00
Martin Kleppmann 961fa3f4a3 Failing test case for complex lookup in a helper which also has a nested template 2010-09-23 02:06:20 +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
Alan Johnson d374744223 Broke out test. 2010-09-20 14:00:09 -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 2291a038d8 Added unmatched block tag detection. 2010-09-17 22:32:01 -04:00
Alan Johnson 0f8593f163 Got empty blocks working. 2010-09-16 08:09:27 -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 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
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 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 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 fa9603f121 Got test case for inverted sections written up. 2010-08-23 22:02:30 -04:00
Alan Johnson a9c875e0a9 Got basic inverted sections working. 2010-08-18 20:57:02 -04:00
Alan Johnson 8f76f99663 Merge branch 'master' into inverted_sections 2010-08-15 16:23:00 -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 135147173b Write tests for inverted sections. 2010-08-15 16:10:26 -04:00
Alan Johnson 467024d1e2 FTiny test tweak - quoted href of a link in one of the test templates, just because it was bugging me. 2010-08-12 23:15:01 -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
Alan Johnson 4f1d6e92bd Added partials. 2010-08-12 21:29:19 -04:00
Alan Johnson cd4d0453f2 Tested that safestrings don't get escaped. 2010-08-08 18:01:42 -04:00
Alan Johnson 792251f6c9 Added the new safestring type and a test for its implementation. 2010-08-08 17:56:35 -04:00
Alan Johnson d5d06c71f0 Added ability to specify unescaped items with &. 2010-08-08 16:34:19 -04:00
Alan Johnson 8a1dd118af Realized I goofed in one spot. Fixed\! 2010-08-08 00:25:55 -04:00
Alan Johnson a74794ba8d Got escaping working, as well as avoiding escaping with {{{ 2010-08-08 00:14:03 -04:00
Alan Johnson ccbb241ac9 Took out a console.log that was hanging around. 2010-08-06 00:36:02 -04:00
Alan Johnson 13ceb010ba Using this.__get__ inside of functions called as expressions now works. 2010-08-06 00:34:03 -04:00
Alan Johnson 03d06fa70a Got rid of some debugging output. 2010-08-05 23:41:24 -04:00
Alan Johnson 21d779bb54 Got rid of failing test. I'll take another stab some other time. 2010-08-04 23:40:15 -04:00
Alan Johnson 4950beea1c Made path parser reusable so that we can use it inside of __get__. 2010-08-04 22:18:40 -04:00
Alan Johnson 54838cd90c Added support for this keyword in paths. 2010-08-04 21:54:57 -04:00
Alan Johnson 4569684998 Updated the path parsing in lookupFor to be a bit smarter and added parse errors for some of the more tricky ones. 2010-08-03 23:26:40 -04:00
Alan Johnson 327744afaf Added parse errors for trying to jump out of context after moving into context in path expressions. 2010-08-03 22:49:36 -04:00
Alan Johnson 5d08ed629d Got accessing data in nested objects working using parent/child syntax. 2010-08-03 01:59:39 -04:00
Alan Johnson 135e7c34cd Got more deeply neested context references working and tested. 2010-08-03 01:43:35 -04:00
Alan Johnson 7e036fb952 Working on test for ../../omg 2010-08-03 00:05:24 -04:00