From 3d503091d956915fe518948e98f6d8d50a27fe3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BA=81=E5=8A=A8=E7=9A=84=E6=B0=A8=E6=B0=94?= <131591012+zaodonganqi@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:24:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E4=B8=8E=E4=B8=83=E5=9C=A3?= =?UTF-8?q?=E5=8F=AC=E5=94=A4=E7=AD=96=E7=95=A5=E8=A7=A3=E6=9E=90=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=B8=AD=E6=96=87=E5=86=92=E5=8F=B7=20(#2110)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 支持中文冒号 * Update build.js --- build/build.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/build.js b/build/build.js index 565c5e255..b5dc426e3 100644 --- a/build/build.js +++ b/build/build.js @@ -298,9 +298,9 @@ function prioritizeVersionTag(tags) { function extractInfoFromCombatFile(filePath) { const content = fs.readFileSync(filePath, 'utf8'); - const authorMatch = content.match(/\/\/\s*作者\s*:(.*)/); - const descriptionMatch = content.match(/\/\/\s*描述\s*:(.*)/); - const versionMatch = content.match(/\/\/\s*版本\s*:(.*)/); + const authorMatch = content.match(/\/\/\s*作者\s*[::](.*)/); + const descriptionMatch = content.match(/\/\/\s*描述\s*[::](.*)/); + const versionMatch = content.match(/\/\/\s*版本\s*[::](.*)/); const characterMatches = content.match(/^(?!\/\/).*?(\S+)(?=\s|$)/gm); let tags = [...new Set(characterMatches || [])] .map(char => char.trim()) @@ -452,9 +452,9 @@ function extractInfoFromPathingFile(filePath, parentFolders) { function extractInfoFromTCGFile(filePath, parentFolder) { const content = fs.readFileSync(filePath, 'utf8'); - const authorMatch = content.match(/\/\/\s*作者:(.*)/); - const descriptionMatch = content.match(/\/\/\s*描述:(.*)/); - const versionMatch = content.match(/\/\/\s*版本:(.*)/); + const authorMatch = content.match(/\/\/\s*作者\s*[::](.*)/); + const descriptionMatch = content.match(/\/\/\s*描述\s*[::](.*)/); + const versionMatch = content.match(/\/\/\s*版本\s*[::](.*)/); // 移除最低版本提取,TCG脚本无需最低版本要求 const characterMatches = content.match(/角色\d+\s?=([^|\r\n{]+)/g);