` element, can be passed in `htmlExtensions`).
+
+## Related
+
+* [`remarkjs/remark`][remark]
+ — markdown processor powered by plugins
+* [`micromark/micromark`][micromark]
+ — the smallest commonmark-compliant markdown parser that exists
+* [`syntax-tree/mdast-util-gfm-strikethrough`][mdast-util-gfm-strikethrough]
+ — mdast utility to support strikethrough
+* [`syntax-tree/mdast-util-from-markdown`][from-markdown]
+ — mdast parser using `micromark` to create mdast from markdown
+* [`syntax-tree/mdast-util-to-markdown`][to-markdown]
+ — mdast serializer to create markdown from mdast
+
+## Contribute
+
+See [`contributing.md` in `micromark/.github`][contributing] for ways to get
+started.
+See [`support.md`][support] for ways to get help.
+
+This project has a [code of conduct][coc].
+By interacting with this repository, organization, or community you agree to
+abide by its terms.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+
+
+[build-badge]: https://img.shields.io/travis/micromark/micromark-extension-gfm-strikethrough.svg
+
+[build]: https://travis-ci.org/micromark/micromark-extension-gfm-strikethrough
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark-extension-gfm-strikethrough.svg
+
+[coverage]: https://codecov.io/github/micromark/micromark-extension-gfm-strikethrough
+
+[downloads-badge]: https://img.shields.io/npm/dm/micromark-extension-gfm-strikethrough.svg
+
+[downloads]: https://www.npmjs.com/package/micromark-extension-gfm-strikethrough
+
+[size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-extension-gfm-strikethrough.svg
+
+[size]: https://bundlephobia.com/result?p=micromark-extension-gfm-strikethrough
+
+[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
+
+[backers-badge]: https://opencollective.com/unified/backers/badge.svg
+
+[collective]: https://opencollective.com/unified
+
+[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
+
+[chat]: https://github.com/micromark/unist/discussions
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: license
+
+[author]: https://wooorm.com
+
+[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+
+[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+
+[micromark]: https://github.com/micromark/micromark
+
+[from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
+
+[to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
+
+[remark]: https://github.com/remarkjs/remark
+
+[mdast]: https://github.com/syntax-tree/mdast
+
+[mdast-util-gfm-strikethrough]: https://github.com/syntax-tree/mdast-util-gfm-strikethrough
+
+[strikethrough]: https://github.github.com/gfm/#strikethrough-extension-
diff --git a/test/index.js b/test/index.js
new file mode 100644
index 0000000..7a0bbad
--- /dev/null
+++ b/test/index.js
@@ -0,0 +1,82 @@
+var fs = require('fs')
+var path = require('path')
+var test = require('tape')
+var micromark = require('micromark')
+var syntax = require('..')
+var html = require('../html')
+
+var input = fs.readFileSync(path.join(__dirname, 'input.md'))
+var output = fs.readFileSync(path.join(__dirname, 'output.html'), 'utf8')
+
+test('markdown -> html (micromark)', function (t) {
+ t.deepEqual(
+ micromark('a ~b~', {
+ extensions: [syntax],
+ htmlExtensions: [html]
+ }),
+ 'a b
',
+ 'should support strikethrough w/ one tilde'
+ )
+
+ t.deepEqual(
+ micromark('a ~~b~~', {
+ extensions: [syntax],
+ htmlExtensions: [html]
+ }),
+ 'a b
',
+ 'should support strikethrough w/ two tildes'
+ )
+
+ t.deepEqual(
+ micromark('a ~~~b~~~', {
+ extensions: [syntax],
+ htmlExtensions: [html]
+ }),
+ 'a ~~~b~~~
',
+ 'should not support strikethrough w/ three tildes'
+ )
+
+ t.deepEqual(
+ micromark(input, {extensions: [syntax], htmlExtensions: [html]}),
+ output,
+ 'should support strikethrough matching how GH does it'
+ )
+
+ t.deepEqual(
+ micromark('a \\~~~b~~ c', {
+ extensions: [syntax],
+ htmlExtensions: [html]
+ }),
+ 'a ~b c
',
+ 'should support strikethrough w/ after an escaped tilde'
+ )
+
+ t.deepEqual(
+ micromark('a ~~b ~~c~~ d~~ e', {
+ extensions: [syntax],
+ htmlExtensions: [html]
+ }),
+ 'a b c d e
',
+ 'should support nested strikethrough'
+ )
+
+ t.deepEqual(
+ micromark('a ~-1~ b', {
+ extensions: [syntax],
+ htmlExtensions: [html]
+ }),
+ 'a -1 b
',
+ 'should open if preceded by whitespace and followed by punctuation'
+ )
+
+ t.deepEqual(
+ micromark('a ~b.~ c', {
+ extensions: [syntax],
+ htmlExtensions: [html]
+ }),
+ 'a b. c
',
+ 'should close if preceded by punctuation and followed by whitespace'
+ )
+
+ t.end()
+})
diff --git a/test/input.md b/test/input.md
new file mode 100644
index 0000000..1f01832
--- /dev/null
+++ b/test/input.md
@@ -0,0 +1,137 @@
+# Strike through / delete
+
+## Balanced
+
+a ~one~ b
+
+a ~~two~~ b
+
+a ~~~three~~~ b
+
+a ~~~~four~~~~ b
+
+## Unbalanced
+
+a ~one/two~~ b
+
+a ~one/three~~~ b
+
+a ~one/four~~~~ b
+
+***
+
+a ~~two/one~ b
+
+a ~~two/three~~~ b
+
+a ~~two/four~~~~ b
+
+***
+
+a ~~~three/one~ b
+
+a ~~~three/two~~ b
+
+a ~~~three/four~~~~ b
+
+***
+
+a ~~~~four/one~ b
+
+a ~~~~four/two~~ b
+
+a ~~~~four/three~~~ b
+
+## Multiple
+
+a ~one b one~ c one~ d
+
+a ~one b two~~ c one~ d
+
+a ~one b one~ c two~~ d
+
+a ~~two b two~~ c two~~ d
+
+a ~~two b one~ c two~~ d
+
+a ~~two b two~~ c one~ d
+
+## Flanking
+
+a oneRight~ b oneRight~ c oneRight~ d
+
+a oneRight~ b oneRight~ c ~oneLeft d
+
+a oneRight~ b ~oneLeft c oneRight~ d
+
+a ~oneLeft b oneRight~ c oneRight~ d
+
+a ~oneLeft b oneRight~ c ~oneLeft d
+
+a ~oneLeft b ~oneLeft c oneRight~ d
+
+a ~oneLeft b ~oneLeft c ~oneLeft d
+
+***
+
+a twoRight~~ b twoRight~~ c twoRight~~ d
+
+a twoRight~~ b twoRight~~ c ~~twoLeft d
+
+a twoRight~~ b ~~twoLeft c twoRight~~ d
+
+a ~~twoLeft b twoRight~~ c twoRight~~ d
+
+a ~~twoLeft b twoRight~~ c ~~twoLeft d
+
+a ~~twoLeft b ~~twoLeft c twoRight~~ d
+
+a ~~twoLeft b ~~twoLeft c ~~twoLeft d
+
+## Interleave with attention
+
+a ~~two *emphasis* two~~ b
+
+a ~~two **strong** two~~ b
+
+a *marker ~~two marker* two~~ b
+
+a ~~two *marker two~~ marker* b
+
+## Interleave with links
+
+a ~~two [resource](#) two~~ b
+
+a ~~two [reference][#] two~~ b
+
+a [label start ~~two label end](#) two~~ b
+
+a ~~two [label start two~~ label end](#) b
+
+a ~~two [label start ~one one~ label end](#) two~~ b
+
+a ~one [label start ~~two two~~ label end](#) one~ b
+
+a ~one [label start ~one one~ label end](#) one~ b
+
+a ~~two [label start ~~two two~~ label end](#) two~~ b
+
+[#]: #
+
+## Interleave with code (text)
+
+a ~~two `code` two~~ b
+
+a ~~two `code two~~` b
+
+a `code start ~~two code end` two~~ b
+
+a ~~two `code start two~~ code end` b
+
+a ~~two `code start ~one one~ code end` two~~ b
+
+a ~one `code start ~~two two~~ code end` one~ b
+
+a ~one `code start ~one one~ code end` one~ b
+
+a ~~two `code start ~~two two~~ code end` two~~ b
diff --git a/test/output.html b/test/output.html
new file mode 100644
index 0000000..33d849d
--- /dev/null
+++ b/test/output.html
@@ -0,0 +1,68 @@
+Strike through / delete
+Balanced
+a one b
+a two b
+a ~~~three~~~ b
+a ~~~~four~~~~ b
+Unbalanced
+a ~one/two~~ b
+a ~one/three~~~ b
+a ~one/four~~~~ b
+
+a ~~two/one~ b
+a ~~two/three~~~ b
+a ~~two/four~~~~ b
+
+a ~~~three/one~ b
+a ~~~three/two~~ b
+a ~~~three/four~~~~ b
+
+a ~~~~four/one~ b
+a ~~~~four/two~~ b
+a ~~~~four/three~~~ b
+Multiple
+a one b one c one~ d
+a one b two~~ c one d
+a one b one c two~~ d
+a two b two c two~~ d
+a two b one~ c two d
+a two b two c one~ d
+Flanking
+a oneRight~ b oneRight~ c oneRight~ d
+a oneRight~ b oneRight~ c ~oneLeft d
+a oneRight~ b oneLeft c oneRight d
+a oneLeft b oneRight c oneRight~ d
+a oneLeft b oneRight c ~oneLeft d
+a ~oneLeft b oneLeft c oneRight d
+a ~oneLeft b ~oneLeft c ~oneLeft d
+
+a twoRight~~ b twoRight~~ c twoRight~~ d
+a twoRight~~ b twoRight~~ c ~~twoLeft d
+a twoRight~~ b twoLeft c twoRight d
+a twoLeft b twoRight c twoRight~~ d
+a twoLeft b twoRight c ~~twoLeft d
+a ~~twoLeft b twoLeft c twoRight d
+a ~~twoLeft b ~~twoLeft c ~~twoLeft d
+Interleave with attention
+a two emphasis two b
+a two strong two b
+a marker ~~two marker two~~ b
+a two *marker two marker* b
+Interleave with links
+a two resource two b
+a two reference two b
+a label start ~~two label end two~~ b
+a ~~two label start two~~ label end b
+a two label start one one label end two b
+a one label start two two label end one b
+a one label start one one label end one b
+a two label start two two label end two b
+Interleave with code (text)
+a two code
two b
+a ~~two code two~~
b
+a code start ~~two code end
two~~ b
+a ~~two code start two~~ code end
b
+a two code start ~one one~ code end
two b
+a one code start ~~two two~~ code end
one b
+a one code start ~one one~ code end
one b
+a two code start ~~two two~~ code end
two b