All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
18 lines
440 B
JavaScript
18 lines
440 B
JavaScript
var phrasing = require('mdast-util-to-markdown/lib/util/container-phrasing')
|
|
|
|
exports.unsafe = [{character: '~', inConstruct: 'phrasing'}]
|
|
exports.handlers = {delete: handleDelete}
|
|
|
|
handleDelete.peek = peekDelete
|
|
|
|
function handleDelete(node, _, context) {
|
|
var exit = context.enter('emphasis')
|
|
var value = phrasing(node, context, {before: '~', after: '~'})
|
|
exit()
|
|
return '~~' + value + '~~'
|
|
}
|
|
|
|
function peekDelete() {
|
|
return '~'
|
|
}
|