micromark
Version:
small commonmark compliant markdown parser with positional info and concrete tokens
18 lines (13 loc) • 468 B
JavaScript
import markdownLineEnding from '../character/markdown-line-ending.mjs'
import spaceFactory from './factory-space.mjs'
var partialBlankLine = {
tokenize: tokenizePartialBlankLine,
partial: true
}
function tokenizePartialBlankLine(effects, ok, nok) {
return spaceFactory(effects, afterWhitespace, 'linePrefix')
function afterWhitespace(code) {
return code === null || markdownLineEnding(code) ? ok(code) : nok(code)
}
}
export default partialBlankLine