jayli-server
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -11,3 +11,3 @@ // 'use strict'; | ||
var reg = '<!--#(chunk)(\\s([a-z]+)=[\'"](.+?)[\'"])* -->'; | ||
var reg = '--#(chunk)(\\s([a-z]+)=[\'"](.+?)[\'"])*--'; | ||
@@ -19,2 +19,3 @@ // p:绝对路径 | ||
var firstInclude = hasIncludes(chunk); | ||
console.log(firstInclude); | ||
if(firstInclude){ | ||
@@ -72,2 +73,2 @@ parseFirstIncludes(chunk,function(newchunk){ | ||
exports.parse = parseOne; | ||
exports.parse = parseOne; |
@@ -232,3 +232,3 @@ /** | ||
if(incFile.indexOf('http://') != -1){ | ||
return '<!--#chunk url="' + incFile.replace(/\\/g, '/') + '" -->'; | ||
return '--#chunk url="' + incFile.replace(/\\/g, '/') + '"--'; | ||
} | ||
@@ -285,3 +285,3 @@ | ||
} | ||
return ret; | ||
@@ -310,3 +310,5 @@ } | ||
); | ||
cont = awpp_replacement(cont); | ||
var repReg = new RegExp((val_insert + '|' + include), 'g'); | ||
@@ -328,2 +330,12 @@ | ||
exports.ssiChunk = parseContent; | ||
// 将<!--HTTP:xxx,utf8:HTTP-->替换为<!--#include path="..." --> | ||
function awpp_replacement(cont){ | ||
var awpp_include = '<!--HTTP:([^,]+),(utf-8|utf8|gbk|gb2312):HTTP-->'; | ||
cont = cont.replace(new RegExp(awpp_include),function(){ | ||
var args = arguments; | ||
return "<!--#include " + 'virtual="' + args[1] + '" -->'; | ||
}); | ||
return cont; | ||
} | ||
exports.ssiChunk = parseContent; |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "A node.js module for delivering static files,width ssi,mock and php", | ||
@@ -10,0 +10,0 @@ "keywords": [ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
235462
4
18
2724