jayli-server
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -327,6 +327,7 @@ /** | ||
// 将<!--HTTP:xxx,utf8:HTTP-->替换为<!--#include path="..." --> | ||
// 将<!--HTTP:xxx,utf8:HTTP-->和<!--TMS:xxx,utf-8:TMS-->替换为<!--#include path="..." --> | ||
function awpp_replacement(cont){ | ||
var awpp_include = '<!--HTTP:([^,]+),(utf-8|utf8|gbk|gb2312):HTTP-->'; | ||
var awpp_include_nake = '<!--HTTP:([^,]+):HTTP-->'; | ||
cont = cont.replace(new RegExp(awpp_include,'ig'),function(){ | ||
@@ -340,2 +341,11 @@ var args = arguments; | ||
}); | ||
// 增加 <!--TMS--> 标签兼容解析,@弘树 | ||
var tmsPrefix = 'trip.taobao.com/go/'; | ||
var tms_include = '<!--TMS:([^,]+),(utf-8|utf8|gbk|gb2312):TMS-->'; | ||
cont = cont.replace(new RegExp(tms_include, 'ig'),function(){ | ||
var args = arguments; | ||
return "<!--#include " + 'virtual="http://' + path.join(tmsPrefix, args[1]) + '" -->'; | ||
}); | ||
return cont; | ||
@@ -342,0 +352,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "A node.js module for delivering static files,width ssi,mock and php", | ||
@@ -10,0 +10,0 @@ "keywords": [ |
240609
2760