From dd4c03d0e36ed7c392e200acc370275e8a25aacc Mon Sep 17 00:00:00 2001 From: David Stone Date: Wed, 19 Jan 2011 16:22:28 -0800 Subject: [PATCH] IE doesn't like negated empty character classes. Changing this to match the "dot" character class wouldn't work, though, because . doesn't match invisible whitespace like newlines, so we need to include those specifically. --- src/handlebars.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlebars.l b/src/handlebars.l index dc63097c..665613ff 100644 --- a/src/handlebars.l +++ b/src/handlebars.l @@ -3,8 +3,8 @@ %% -[^]*?/("{{") { this.begin("mu"); if (yytext) return 'CONTENT'; } -[^]+ { return 'CONTENT'; } +(.|\n|\r)*?/("{{") { this.begin("mu"); if (yytext) return 'CONTENT'; } +(.|\n|\r)+ { return 'CONTENT'; } "{{>" { return 'OPEN_PARTIAL'; } "{{#" { return 'OPEN_BLOCK'; }