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:
30
node_modules/mdast-util-to-markdown/lib/handle/break.js
generated
vendored
Normal file
30
node_modules/mdast-util-to-markdown/lib/handle/break.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @import {Break, Parents} from 'mdast'
|
||||
* @import {Info, State} from 'mdast-util-to-markdown'
|
||||
*/
|
||||
|
||||
import {patternInScope} from '../util/pattern-in-scope.js'
|
||||
|
||||
/**
|
||||
* @param {Break} _
|
||||
* @param {Parents | undefined} _1
|
||||
* @param {State} state
|
||||
* @param {Info} info
|
||||
* @returns {string}
|
||||
*/
|
||||
export function hardBreak(_, _1, state, info) {
|
||||
let index = -1
|
||||
|
||||
while (++index < state.unsafe.length) {
|
||||
// If we can’t put eols in this construct (setext headings, tables), use a
|
||||
// space instead.
|
||||
if (
|
||||
state.unsafe[index].character === '\n' &&
|
||||
patternInScope(state.stack, state.unsafe[index])
|
||||
) {
|
||||
return /[ \t]/.test(info.before) ? '' : ' '
|
||||
}
|
||||
}
|
||||
|
||||
return '\\\n'
|
||||
}
|
Reference in New Issue
Block a user