Finish compatibility with the old handlebars:
* foo"bar" is an invalid param
* {{foo}}bar{{/baz}} is invalid
* fix a number of issues with inverse sections
* add partials
This commit is contained in:
@@ -69,7 +69,12 @@ Handlebars.HandlebarsLexer.prototype.lex = function() {
|
||||
// All other cases are IDs or errors
|
||||
} else {
|
||||
// grab alphanumeric characters
|
||||
while(this.peek().match(/[0-9A-Za-z\.]/)) { this.getchar() }
|
||||
while(this.peek().match(/[_0-9A-Za-z\.]/)) { this.getchar() }
|
||||
|
||||
var peek = this.peek();
|
||||
if(peek !== "}" && peek !== " " && peek !== "/") {
|
||||
return
|
||||
}
|
||||
|
||||
// if any characters were grabbed => ID
|
||||
if(this.yytext.length) { return "ID" }
|
||||
|
||||
Reference in New Issue
Block a user