{"_id":"@cjser/micromark-extension-gfm-strikethrough","name":"@cjser/micromark-extension-gfm-strikethrough","dist-tags":{"latest":"2.1.0-cjser.2"},"versions":{"2.1.0-cjser.2":{"name":"@cjser/micromark-extension-gfm-strikethrough","version":"2.1.0-cjser.2","description":"micromark extension to support GFM strikethrough","license":"MIT","keywords":["micromark","micromark-extension","strikethrough","strike","through","del","delete","deletion","gfm","markdown","unified"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"bugs":{"url":"https://github.com/micromark/micromark-extension-gfm-strikethrough/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","exports":{"require":"./dist-cjser/index.cjs","development":"./dev/index.js","default":"./index.js"},"dependencies":{"@cjser/devlop":"1.1.0-cjser.2","@cjser/micromark-util-chunked":"2.0.1-cjser.2","@cjser/micromark-util-classify-character":"2.0.1-cjser.2","@cjser/micromark-util-resolve-all":"2.0.1-cjser.2","@cjser/micromark-util-symbol":"2.0.1-cjser.2","@cjser/micromark-util-types":"2.0.2-cjser.2"},"devDependencies":{"@types/node":"^20.0.0","c8":"^10.0.0","create-gfm-fixtures":"^1.0.0","micromark":"^4.0.0","micromark-build":"^2.0.0","prettier":"^3.0.0","remark-cli":"^12.0.0","remark-preset-wooorm":"^10.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","xo":"^0.58.0"},"scripts":{"build":"tsc --build --clean && tsc --build && type-coverage && micromark-build","format":"remark . -qfo && prettier . -w --log-level warn && xo --fix","test-api-prod":"node --conditions production test/index.js","test-api-dev":"node --conditions development test/index.js","test-api":"npm run test-api-dev && npm run test-api-prod","test-coverage":"c8 --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"bracketSpacing":false,"semi":false,"singleQuote":true,"tabWidth":2,"trailingComma":"none","useTabs":false},"remarkConfig":{"plugins":["remark-preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"ignoreCatch":true,"strict":true},"xo":{"prettier":true,"rules":{"logical-assignment-operators":"off","max-depth":"off","unicorn/prefer-at":"off"},"overrides":[{"files":"**/*.ts","rules":{"@typescript-eslint/array-type":["error",{"default":"generic"}],"@typescript-eslint/ban-types":["error",{"extendDefaults":true}],"@typescript-eslint/consistent-type-definitions":["error","interface"]}},{"files":"test/**/*.js","rules":{"no-await-in-loop":0}}]},"main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"2.1.0","cjserVersion":2,"original":{"name":"micromark-extension-gfm-strikethrough","version":"2.1.0","exports":{"development":"./dev/index.js","default":"./index.js"},"repository":"micromark/micromark-extension-gfm-strikethrough","dependencies":{"devlop":"^1.0.0","micromark-util-chunked":"^2.0.0","micromark-util-classify-character":"^2.0.0","micromark-util-resolve-all":"^2.0.0","micromark-util-symbol":"^2.0.0","micromark-util-types":"^2.0.0"},"files":["dev/","lib/","index.d.ts","index.js"],"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage && micromark-build","format":"remark . -qfo && prettier . -w --log-level warn && xo --fix","test-api-prod":"node --conditions production test/index.js","test-api-dev":"node --conditions development test/index.js","test-api":"npm run test-api-dev && npm run test-api-prod","test-coverage":"c8 --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"}}},"gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_id":"@cjser/micromark-extension-gfm-strikethrough@2.1.0-cjser.2","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-pbk8bo1HIIBl6cSvdEGPLXNWH45mjB+Xzt1xKR9zs3MjCEzdR5aRAjMZ+Zo7Pv9F8cHdPvzpZVtVpSyXB9vezQ==","shasum":"84b595e72828a24bd0f068d8ead2a8929b1c8c5d","tarball":"https://registry.npmjs.org/@cjser/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0-cjser.2.tgz","fileCount":16,"unpackedSize":35193,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDprm+qktSQCZbPN7G0P4iP6zgNMnR3oo1HoGIMQx8VfQIgDQFM5VOYCEpkIYU7ISrWqktN5iZ2DrGT3ff8VrOjNzg="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/micromark-extension-gfm-strikethrough_2.1.0-cjser.2_1778864943832_0.11258440226277777"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-15T17:09:03.736Z","2.1.0-cjser.2":"2026-05-15T17:09:04.041Z","modified":"2026-05-15T17:09:04.217Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"micromark extension to support GFM strikethrough","keywords":["micromark","micromark-extension","strikethrough","strike","through","del","delete","deletion","gfm","markdown","unified"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/micromark/micromark-extension-gfm-strikethrough/issues"},"license":"MIT","readme":"# micromark-extension-gfm-strikethrough\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[micromark][] extensions to support GFM [strikethrough][].\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When to use this](#when-to-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`gfmStrikethrough(options?)`](#gfmstrikethroughoptions)\n  * [`gfmStrikethroughHtml()`](#gfmstrikethroughhtml)\n  * [`Options`](#options)\n* [Authoring](#authoring)\n* [HTML](#html)\n* [CSS](#css)\n* [Syntax](#syntax)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Related](#related)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package contains extensions that add support for strikethrough as enabled\nby GFM to [`micromark`][micromark].\n\n## When to use this\n\nThis project is useful when you want to support strikethrough in markdown.\n\nYou can use these extensions when you are working with [`micromark`][micromark].\nTo support all GFM features, use\n[`micromark-extension-gfm`][micromark-extension-gfm].\n\nWhen you need a syntax tree, you can combine this package with\n[`mdast-util-gfm-strikethrough`][mdast-util-gfm-strikethrough].\n\nAll these packages are used [`remark-gfm`][remark-gfm], which focusses on making\nit easier to transform content by abstracting these internals away.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install micromark-extension-gfm-strikethrough\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {gfmStrikethrough, gfmStrikethroughHtml} from 'https://esm.sh/micromark-extension-gfm-strikethrough@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {gfmStrikethrough, gfmStrikethroughHtml} from 'https://esm.sh/micromark-extension-gfm-strikethrough@2?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {micromark} from 'micromark'\nimport {\n  gfmStrikethrough,\n  gfmStrikethroughHtml\n} from 'micromark-extension-gfm-strikethrough'\n\nconst output = micromark('Some ~strikethrough~.', {\n  extensions: [gfmStrikethrough()],\n  htmlExtensions: [gfmStrikethroughHtml()]\n})\n\nconsole.log(output)\n```\n\nYields:\n\n```html\n<p>Some <del>strikethrough</del></p>.\n```\n\n## API\n\nThis package exports the identifiers\n[`gfmStrikethrough`][api-gfm-strikethrough] and\n[`gfmStrikethroughHtml`][api-gfm-strikethrough-html].\nThere is no default export.\n\nThe export map supports the [`development` condition][development].\nRun `node --conditions development module.js` to get instrumented dev code.\nWithout this condition, production code is loaded.\n\n### `gfmStrikethrough(options?)`\n\nCreate an extension for `micromark` to enable GFM strikethrough syntax.\n\n###### Parameters\n\n* `options` ([`Options`][api-options], optional)\n  — configuration\n\n###### Returns\n\nExtension for `micromark` that can be passed in `extensions`, to\nenable GFM strikethrough syntax ([`Extension`][micromark-extension]).\n\n### `gfmStrikethroughHtml()`\n\nCreate an HTML extension for `micromark` to support GFM strikethrough when\nserializing to HTML.\n\n###### Returns\n\nExtension for `micromark` that can be passed in `htmlExtensions`, to support\nGFM strikethrough when serializing to HTML\n([`HtmlExtension`][micromark-html-extension]).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n* `singleTilde` (`boolean`, default: `true`)\n  — whether to support strikethrough with a single tilde.\n  Single tildes work on github.com, but are technically prohibited by the GFM\n  spec\n\n## Authoring\n\nWhen authoring markdown with strikethrough, it is recommended to use two\nmarkers.\nWhile `github.com` allows single tildes too, it technically prohibits it in\ntheir spec.\n\n## HTML\n\nWhen tilde sequences match, they together relate to the `<del>` element in\nHTML.\nSee [*§ 4.7.2 The `del` element*][html-del] in the HTML spec for more info.\n\n## CSS\n\nGitHub itself does not apply interesting CSS to `del` elements.\nIt currently (July 2022) does change `code` in `del`.\n\n```css\ndel code {\n  text-decoration: inherit;\n}\n```\n\nFor the complete actual CSS see\n[`sindresorhus/github-markdown-css`][github-markdown-css].\n\n## Syntax\n\nStrikethrough sequences form with the following BNF:\n\n```bnf\ngfm_attention_sequence ::= 1*'~'\n```\n\nSequences are matched together to form strikethrough based on which character\nthey contain, how long they are, and what character occurs before and after\neach sequence.\nOtherwise they are turned into data.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line,\n`micromark-extension-gfm-strikethrough@^2`, compatible with Node.js 16.\n\nThis package works with `micromark` version `3` and later.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n* [`micromark-extension-gfm`][micromark-extension-gfm]\n  — support all of GFM\n* [`mdast-util-gfm-strikethrough`][mdast-util-gfm-strikethrough]\n  — support all of GFM in mdast\n* [`mdast-util-gfm`][mdast-util-gfm]\n  — support all of GFM in mdast\n* [`remark-gfm`][remark-gfm]\n  — support all of GFM in remark\n\n## Contribute\n\nSee [`contributing.md` in `micromark/.github`][contributing] for ways to get\nstarted.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/micromark/micromark-extension-gfm-strikethrough/workflows/main/badge.svg\n\n[build]: https://github.com/micromark/micromark-extension-gfm-strikethrough/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark-extension-gfm-strikethrough.svg\n\n[coverage]: https://codecov.io/github/micromark/micromark-extension-gfm-strikethrough\n\n[downloads-badge]: https://img.shields.io/npm/dm/micromark-extension-gfm-strikethrough.svg\n\n[downloads]: https://www.npmjs.com/package/micromark-extension-gfm-strikethrough\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-extension-gfm-strikethrough\n\n[size]: https://bundlejs.com/?q=micromark-extension-gfm-strikethrough\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/micromark/micromark/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esmsh]: https://esm.sh\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[contributing]: https://github.com/micromark/.github/blob/main/contributing.md\n\n[support]: https://github.com/micromark/.github/blob/main/support.md\n\n[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[typescript]: https://www.typescriptlang.org\n\n[development]: https://nodejs.org/api/packages.html#packages_resolving_user_conditions\n\n[micromark]: https://github.com/micromark/micromark\n\n[micromark-html-extension]: https://github.com/micromark/micromark#htmlextension\n\n[micromark-extension]: https://github.com/micromark/micromark#syntaxextension\n\n[micromark-extension-gfm]: https://github.com/micromark/micromark-extension-gfm\n\n[mdast-util-gfm-strikethrough]: https://github.com/syntax-tree/mdast-util-gfm-strikethrough\n\n[mdast-util-gfm]: https://github.com/syntax-tree/mdast-util-gfm\n\n[remark-gfm]: https://github.com/remarkjs/remark-gfm\n\n[strikethrough]: https://github.github.com/gfm/#strikethrough-extension-\n\n[github-markdown-css]: https://github.com/sindresorhus/github-markdown-css\n\n[html-del]: https://html.spec.whatwg.org/multipage/edits.html#the-del-element\n\n[api-gfm-strikethrough]: #gfmstrikethroughoptions\n\n[api-gfm-strikethrough-html]: #gfmstrikethroughhtml\n\n[api-options]: #options\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/micromark/micromark-extension-gfm-strikethrough\n","readmeFilename":"readme.md","_rev":"1-566ecb80de283d8b51f6cb3db0c364f6"}