🐛 完善公告时间正则

This commit is contained in:
目棃
2024-03-11 12:48:48 +08:00
parent 29b8bf84a6
commit 8bf745948c

View File

@@ -196,9 +196,11 @@ function getAnnoTime(content: string): string | false {
return res?.[0].replace(/.*?(\d\.\d版本期间持续开放)/, "$1") ?? false; return res?.[0].replace(/.*?(\d\.\d版本期间持续开放)/, "$1") ?? false;
} }
if (content.match(regexes[1])) { if (content.match(regexes[1])) {
console.log("actPermanently"); const res = content.match(regexes[1]);
// todo 待处理 if (res === null) return false;
return false; const regex2 = /\d\.\d版本更新(?:完成|)后永久开放/;
const res2 = res[0].match(regex2);
return res2 === null ? false : res2[0];
} }
if (content.match(regexes[2])) { if (content.match(regexes[2])) {
const res = content.match(regexes[2]); const res = content.match(regexes[2]);