refactor: enforce named capture groups; clean up regexes (#6524)

* refactor: enforce named capture groups; clean up regexes

* fixes

* fix
This commit is contained in:
Joshua Chen 2022-02-01 17:43:15 +08:00 committed by GitHub
parent c56e6194b4
commit 1cefb643dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 80 additions and 77 deletions

View file

@ -60,7 +60,7 @@ function processSection(section) {
});
}
let hour = 20;
const date = title.match(/ \((.*)\)/)[1];
const date = title.match(/ \((?<date>.*)\)/)?.groups.date;
while (publishTimes.has(`${date}T${hour}:00`)) {
hour -= 1;
}