Commit Graph

168 Commits

Author SHA1 Message Date
wycats 7100563373 Add a Gemfile for testing 2010-11-25 11:51:50 -08:00
wycats d97bc591a2 Restructure files to make more sense in a non-CommonJS world. 2010-11-25 02:49:08 -08:00
wycats 38f8ae84fe Explain something in the lexer 2010-11-25 00:58:42 -08:00
wycats 85fa2cb65f Initial commit. Note that I'm using CommonJS modules and node purely to help me develop this. If this ends up being useful, I will likely distribute the entire package as a single JS file for easier consumption in the browser. 2010-11-25 00:50:57 -08:00
Alan Johnson d2b8e0296d Got rid of log messages for debugging. 2010-11-20 22:03:00 -05:00
Alan Johnson 4b4c13f40d More work on context object. Just one more failing test. 2010-11-20 21:40:35 -05:00
Alan Johnson aa976283db Just two more failing tests on the new constext object rewrite. 2010-11-20 17:08:06 -05:00
Alan Johnson 38d2be4cc0 Working on getting context object working. 2010-11-20 15:26:28 -05:00
wycats f1e6acf628 Revert "Make it possible for helpers to let downstream helpers know what the path to the current object is"
This reverts commit 71dffd95c7.
2010-11-19 11:59:44 -08:00
wycats 71dffd95c7 Make it possible for helpers to let downstream helpers know what the path to the current object is 2010-11-17 18:34:37 -08:00
wycats 766497bb55 Add support for multiple params and String literals 2010-11-17 16:12:24 -08:00
wycats 75f2c8e3ce Fix indentation issue 2010-11-17 13:35:26 -08:00
wycats a15ae62460 Whitespace 2010-11-17 13:32:04 -08:00
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 3517710578 One more readme tweak - last one, I promise. 2010-10-12 22:24:02 -04:00
Alan Johnson 2114688c1f Updated readme. 2010-10-12 22:23:07 -04:00
Alan Johnson 0788e5d83b Added note about handlebars-contrib. 2010-10-12 22:22:25 -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 f436c1d440 Added sammy.js link to readme, since they just added support for us as a template plugin (Thanks, Aaron!) 2010-09-27 14:03:29 -04:00
Alan Johnson 7a8ef3ba78 2010-09-26 17:55:08 -04:00
Alan Johnson 01273cf00d More README tweaks. 2010-09-26 17:53:26 -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 7fbf208f4b Tidied up docs a bit. 2010-09-22 14:18:28 -04: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 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 5b5e686c0d Added license terms. 2010-09-14 20:54:51 -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 c176892639 Updated todo. 2010-09-13 22:05:17 -04:00
Alan Johnson 75a1aa4a0d Added Handlebars.trim for IE compatibility. 2010-09-13 21:31:57 -04:00