the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @import {HtmlExtension} from 'micromark-util-types'
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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>');
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user