Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.
This commit is contained in:
24
node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js
generated
vendored
Normal file
24
node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @import {CompilePattern} from '../types.js'
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {CompilePattern}
|
||||
*/
|
||||
export function compilePattern(pattern) {
|
||||
if (!pattern._compiled) {
|
||||
const before =
|
||||
(pattern.atBreak ? '[\\r\\n][\\t ]*' : '') +
|
||||
(pattern.before ? '(?:' + pattern.before + ')' : '')
|
||||
|
||||
pattern._compiled = new RegExp(
|
||||
(before ? '(' + before + ')' : '') +
|
||||
(/[|\\{}()[\]^$+*?.-]/.test(pattern.character) ? '\\' : '') +
|
||||
pattern.character +
|
||||
(pattern.after ? '(?:' + pattern.after + ')' : ''),
|
||||
'g'
|
||||
)
|
||||
}
|
||||
|
||||
return pattern._compiled
|
||||
}
|
Reference in New Issue
Block a user