Skip to content

Commit

Permalink
better regex
Browse files Browse the repository at this point in the history
  • Loading branch information
janl committed Feb 4, 2010
1 parent 1763084 commit 6ff7cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mustache.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var Mustache = function() {
}

var that = this;
var regex = new RegExp(this.otag + "%([A-Z0-9-]+) ?([a-z0-9]+=[a-z0-9]+)?"
var regex = new RegExp(this.otag + "%([\\w_-]+) ?([\\w]+=[\\w]+)?"
+ this.ctag);
return template.replace(regex, function(match, pragma, options) {
that.pragmas[pragma] = {};
Expand Down

0 comments on commit 6ff7cd4

Please sign in to comment.