瀏覽代碼

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

tags/0.3.0
Jan Lehnardt 16 年之前
父節點
當前提交
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]) {


Loading…
取消
儲存