Просмотр исходного кода

Regex: \w includes "_". Thanks Leeoniya.

tags/0.3.0
Jan Lehnardt 16 лет назад
Родитель
Сommit
0b10ab0db8
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Просмотреть файл

@@ -62,7 +62,7 @@ var Mustache = function() {
}

var that = this;
var regex = new RegExp(this.otag + "%([\\w_-]+) ?([\\w]+=[\\w]+)?" +
var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" +
this.ctag);
return template.replace(regex, function(match, pragma, options) {
if(!that.pragmas_implemented[pragma]) {


Загрузка…
Отмена
Сохранить