Procházet zdrojové kódy

better regex

tags/0.2.2
Jan Lehnardt před 16 roky
rodič
revize
6ff7cd470c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Zobrazit soubor

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


Načítá se…
Zrušit
Uložit