Explorar el Código

better regex

tags/0.2.2
Jan Lehnardt hace 16 años
padre
commit
6ff7cd470c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Ver fichero

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


Cargando…
Cancelar
Guardar