summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-12-23 19:22:30 -0600
committerkpdecker <kpdecker@gmail.com>2013-12-23 19:22:30 -0600
commit40e1837b14f1fa9d368cd24b95ea2d6116fff1f4 (patch)
tree147e9a730a234473fb03e528c6a167c69e8e475c /src
parentddea5be2a49ab8c3defac4b08bd8f6f14a3bf905 (diff)
parent9d353bd3dd24b1e975ddf14a77179d4ab016706c (diff)
downloadhandlebars.js-40e1837b14f1fa9d368cd24b95ea2d6116fff1f4.zip
handlebars.js-40e1837b14f1fa9d368cd24b95ea2d6116fff1f4.tar.gz
handlebars.js-40e1837b14f1fa9d368cd24b95ea2d6116fff1f4.tar.bz2
Merge branch 'fix-escapes' of github.com:dmarcotte/handlebars.js into dmarcotte-fix-escapes
Conflicts: spec/tokenizer.js
Diffstat (limited to 'src')
-rw-r--r--src/handlebars.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handlebars.l b/src/handlebars.l
index cc46939..913121c 100644
--- a/src/handlebars.l
+++ b/src/handlebars.l
@@ -43,9 +43,9 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
[^\x00]+ return 'CONTENT';
-<emu>[^\x00]{2,}?/("{{"|<<EOF>>) {
- if(yytext.slice(-1) !== "\\") this.popState();
- if(yytext.slice(-1) === "\\") strip(0,1);
+// marks CONTENT up to the next mustache or escaped mustache
+<emu>[^\x00]{2,}?/("{{"|"\\{{"|"\\\\{{"|<<EOF>>) {
+ this.popState();
return 'CONTENT';
}