Files
coopgo/node_modules/mdast-util-gfm-strikethrough/to-markdown.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

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 '~'
}