战斗与七圣召唤策略解析支持中文冒号 (#2110)

* 支持中文冒号

* Update build.js
This commit is contained in:
躁动的氨气
2025-10-10 09:24:47 +08:00
committed by GitHub
parent 44dc400c17
commit 3d503091d9

View File

@@ -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);