From ce1ed0dc4ad05a12f5c9ed901ac18d2033f815cc Mon Sep 17 00:00:00 2001 From: wycats Date: Mon, 10 Jan 2011 15:47:07 -0800 Subject: [PATCH] Fix for shitty JS regex engines. --- src/handlebars.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlebars.l b/src/handlebars.l index d6b354f1..b63f7cd1 100644 --- a/src/handlebars.l +++ b/src/handlebars.l @@ -3,8 +3,8 @@ %% -(.|\s)*?/("{{") { this.begin("mu"); if (yytext) return 'CONTENT'; } -(.|\s)+ { return 'CONTENT'; } +[.\s]*?/("{{") { this.begin("mu"); if (yytext) return 'CONTENT'; } +[.|\s]+ { return 'CONTENT'; } "{{>" { return 'OPEN_PARTIAL'; } "{{#" { return 'OPEN_BLOCK'; }