mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-19 19:22:28 +02:00
refactor: enforce named capture groups; clean up regexes (#6524)
* refactor: enforce named capture groups; clean up regexes * fixes * fix
This commit is contained in:
parent
c56e6194b4
commit
1cefb643dd
32 changed files with 80 additions and 77 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue