mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🐛 完善公告时间正则
This commit is contained in:
@@ -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]);
|
||||||
|
|||||||
Reference in New Issue
Block a user