diff options
author | Yehuda Katz <wycats@gmail.com> | 2011-12-27 01:21:53 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2011-12-27 01:21:53 -0800 |
commit | 373d10edb1b3ff918c5d2c2965d2e243b05b1c21 (patch) | |
tree | d241a2a15b401fdfc34eb2aaefcd0491879da932 /src | |
parent | bd0f74fbd9c80aa148a66012b9db51df102eda64 (diff) | |
download | handlebars.js-373d10edb1b3ff918c5d2c2965d2e243b05b1c21.zip handlebars.js-373d10edb1b3ff918c5d2c2965d2e243b05b1c21.tar.gz handlebars.js-373d10edb1b3ff918c5d2c2965d2e243b05b1c21.tar.bz2 |
Literal square-bracket path segments cannot have ] in them. TODO: Allow escaped path segments.
Diffstat (limited to 'src')
-rw-r--r-- | src/handlebars.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/handlebars.l b/src/handlebars.l index b671a94..ec99edc 100644 --- a/src/handlebars.l +++ b/src/handlebars.l @@ -28,7 +28,7 @@ <mu>"false"/[}\s] { return 'BOOLEAN'; } <mu>[0-9]+/[}\s] { return 'INTEGER'; } <mu>[a-zA-Z0-9_$-]+/[=}\s\/.] { return 'ID'; } -<mu>\[.*\] { yytext = yytext.substr(1, yyleng-2); return 'ID'; } +<mu>\[[^\]]*\] { yytext = yytext.substr(1, yyleng-2); return 'ID'; } <mu>. { return 'INVALID'; } <INITIAL,mu><<EOF>> { return 'EOF'; } |