mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-09 22:32:53 +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
|
@ -69,8 +69,8 @@ export async function generate(
|
|||
}
|
||||
}
|
||||
|
||||
const indexRE = /(^|.*\/)index\.(md|mdx|js|jsx|ts|tsx)$/i;
|
||||
const extRE = /\.(md|mdx|js|jsx|ts|tsx)$/;
|
||||
const indexRE = /(?<dirname>^|.*\/)index\.(?:mdx?|jsx?|tsx?)$/i;
|
||||
const extRE = /\.(?:mdx?|jsx?|tsx?)$/;
|
||||
|
||||
/**
|
||||
* Convert filepath to url path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue