From 53a7e425b8c338cbbca82e6a49304bef1f347f84 Mon Sep 17 00:00:00 2001 From: Shawn Wen <45581750+KOP-XIAO@users.noreply.github.com> Date: Fri, 6 Feb 2026 15:38:33 +0800 Subject: [PATCH] Update resource-parser.js --- Scripts/resource-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/resource-parser.js b/Scripts/resource-parser.js index d87d8d1..a7fc8a9 100644 --- a/Scripts/resource-parser.js +++ b/Scripts/resource-parser.js @@ -3050,7 +3050,7 @@ function YAMLFix(cnt){ cnt = cnt.replace(/\[/g,"yaml@bug1").replace(/\\r/g,"").replace(/\*/g,"yaml@bug2") //2022-08-08 增加 .replace(/\*/g,"🌟@bug2") 以解决名字以 * 开始时引起的部分问题 if (cnt.indexOf("{") != -1 && /\{\s*\"*(name|type|server)/.test(cnt)){ // - { } 类型 yaml - cnt = cnt.replace(/ +/g," ").replace(/\s\-\s\{/g," - {") // 2026-02-06 部分空格解析错误 + cnt = cnt.replace(/ +/g," ").replace(/ \- \{/g," - {") // 2026-02-06 部分空格解析错误 cnt = cnt.replace(/(^|\n)- /g, "$1 - ").replace(/ - /g," - ").replace(/:(?!\s)/g,": ").replace(/\,\"/g,", \"").replace(/: {\s{0,1}/g, ": {, ").replace(/, (Host|host|path|mux)/g,", $1") //2022-04-11 remove tls|skip from replace(/, (Host|host|path|mux)/g,", $1") console.log("1st:\n"+cnt)