This commit is contained in:
17
node_modules/mdast-util-gfm-strikethrough/to-markdown.js
generated
vendored
Normal file
17
node_modules/mdast-util-gfm-strikethrough/to-markdown.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
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 '~'
|
||||
}
|
||||
Reference in New Issue
Block a user