diff options
-rw-r--r-- | README.markdown | 1 | ||||
-rw-r--r-- | lib/handlebars/compiler/javascript-compiler.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index 58c7515..0297c35 100644 --- a/README.markdown +++ b/README.markdown @@ -383,6 +383,7 @@ Handlebars in the Wild templating engine, extending it with automatic data binding support. * [YUI](http://yuilibrary.com/yui/docs/handlebars/) implements a port of handlebars * [Swag](https://github.com/elving/swag) by [@elving](https://github.com/elving) is a growing collection of helpers for handlebars.js. Give your handlebars.js templates some swag son! +* [DOMBars](https://github.com/blakeembrey/dombars) is a DOM-based templating engine built on the Handlebars parser and runtime External Resources ------------------ diff --git a/lib/handlebars/compiler/javascript-compiler.js b/lib/handlebars/compiler/javascript-compiler.js index 08b818e..159a38b 100644 --- a/lib/handlebars/compiler/javascript-compiler.js +++ b/lib/handlebars/compiler/javascript-compiler.js @@ -882,7 +882,7 @@ for(var i=0, l=reservedWords.length; i<l; i++) { } JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { - if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) { + if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name)) { return true; } return false; |