Skip to content

Commit 6daf942

Browse files
committed
修复tcg的一些判断
1 parent 3837203 commit 6daf942

File tree

2 files changed

+2548
-2390
lines changed

2 files changed

+2548
-2390
lines changed

build/build.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function extractInfoFromTCGFile(filePath, parentFolder) {
113113
const content = fs.readFileSync(filePath, 'utf8');
114114
const authorMatch = content.match(/\/\/\s*:(.*)/);
115115
const descriptionMatch = content.match(/\/\/\s*:(.*)/);
116-
const characterMatches = content.match(/\d+=([^|\r\n{]+)/g);
116+
const characterMatches = content.match(/\d+\s?=([^|\r\n{]+)/g);
117117

118118
let tags = characterMatches
119119
? characterMatches.map(match => match.split('=')[1].trim())
@@ -123,6 +123,9 @@ function extractInfoFromTCGFile(filePath, parentFolder) {
123123
if (filePath.includes('惊喜牌组')) {
124124
tags = ['惊喜牌组', ...tags];
125125
}
126+
if (filePath.includes('酒馆挑战')) {
127+
tags = ['酒馆挑战', ...tags];
128+
}
126129

127130
return {
128131
author: authorMatch ? authorMatch[1].trim() : '',

0 commit comments

Comments
 (0)