astro-ghostcms/.pnpm-store/v3/files/47/a27cdaeee59ee041b1398a39fca...

27 lines
567 B
Plaintext

/**
* @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension
*/
/**
* Create an HTML extension for `micromark` to support GFM strikethrough when
* serializing to HTML.
*
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions`, to
* support GFM strikethrough when serializing to HTML.
*/
export function gfmStrikethroughHtml() {
return {
enter: {
strikethrough() {
this.tag('<del>')
}
},
exit: {
strikethrough() {
this.tag('</del>')
}
}
}
}