🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
14
node_modules/@mdx-js/mdx/lib/util/extnames-to-regex.js
generated
vendored
Normal file
14
node_modules/@mdx-js/mdx/lib/util/extnames-to-regex.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Utility to turn a list of extnames (*with* dots) into an expression.
|
||||
*
|
||||
* @param {Array<string>} extnames
|
||||
* List of extnames.
|
||||
* @returns {RegExp}
|
||||
* Regex matching them.
|
||||
*/
|
||||
export function extnamesToRegex(extnames) {
|
||||
// eslint-disable-next-line security/detect-non-literal-regexp
|
||||
return new RegExp(
|
||||
'\\.(' + extnames.map((d) => d.slice(1)).join('|') + ')([?#]|$)'
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue