d11 theme
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
613 B

'use strict'
var markdownLineEnding = require('../character/markdown-line-ending.js')
var hardBreakEscape = {
name: 'hardBreakEscape',
tokenize: tokenizeHardBreakEscape
}
function tokenizeHardBreakEscape(effects, ok, nok) {
return start
function start(code) {
effects.enter('hardBreakEscape')
effects.enter('escapeMarker')
effects.consume(code)
return open
}
function open(code) {
if (markdownLineEnding(code)) {
effects.exit('escapeMarker')
effects.exit('hardBreakEscape')
return ok(code)
}
return nok(code)
}
}
module.exports = hardBreakEscape