Sfoglia il codice sorgente

better regex

tags/0.2.2
Jan Lehnardt 16 anni fa
parent
commit
6ff7cd470c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Vedi File

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


Loading…
Annulla
Salva