Urara-Blog/node_modules/.pnpm-store/v3/files/96/30a57b641b3ab478f06386fb5a31e5b1039c246ddaab0729e32cc58289440c78b7e5d078556298da78aa357382c0ad2526f3fc2d56c799760b49b657aea590
2022-08-14 01:14:53 +08:00

26 lines
696 B
Text

/**
* @typedef {import('micromark-util-types').Construct} Construct
* @typedef {import('micromark-util-types').Tokenizer} Tokenizer
* @typedef {import('micromark-util-types').State} State
*/
import {factorySpace} from 'micromark-factory-space'
import {markdownLineEnding} from 'micromark-util-character'
/** @type {Construct} */
export const lineEnding = {
name: 'lineEnding',
tokenize: tokenizeLineEnding
}
/** @type {Tokenizer} */
function tokenizeLineEnding(effects, ok) {
return start
/** @type {State} */
function start(code) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return factorySpace(effects, ok, 'linePrefix')
}
}