Parcourir la source

better regex

tags/0.2.2
Jan Lehnardt il y a 16 ans
Parent
révision
6ff7cd470c
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Voir le fichier

@@ -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] = {};


Chargement…
Annuler
Enregistrer