From 0b10ab0db8626c177c89ec09d50df07c1f9c04b5 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Mon, 24 May 2010 11:12:46 +0200 Subject: [PATCH] Regex: \w includes "_". Thanks Leeoniya. --- mustache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mustache.js b/mustache.js index 19c8417..be1d7e6 100644 --- a/mustache.js +++ b/mustache.js @@ -62,7 +62,7 @@ var Mustache = function() { } var that = this; - var regex = new RegExp(this.otag + "%([\\w_-]+) ?([\\w]+=[\\w]+)?" + + var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" + this.ctag); return template.replace(regex, function(match, pragma, options) { if(!that.pragmas_implemented[pragma]) {