{"name":"micromark-extension-gfm-strikethrough","version":"1.0.7","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":"git+https://github.com/micromark/micromark-extension-gfm-strikethrough.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","main":"index.js","types":"index.d.ts","exports":{"development":"./dev/index.js","default":"./index.js"},"dependencies":{"micromark-util-chunked":"^1.0.0","micromark-util-classify-character":"^1.0.0","micromark-util-resolve-all":"^1.0.0","micromark-util-symbol":"^1.0.0","micromark-util-types":"^1.0.0","uvu":"^0.5.0"},"devDependencies":{"@types/node":"^20.0.0","c8":"^7.0.0","create-gfm-fixtures":"^1.0.0","micromark":"^3.0.0","micromark-build":"^1.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","xo":"^0.54.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage && micromark-build","format":"remark . -qfo && prettier . -w --loglevel 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":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"n/file-extension-in-import":"off","max-depth":"off","unicorn/prefer-node-protocol":"off"},"overrides":[{"files":"test/**/*.js","rules":{"no-await-in-loop":0}}]},"remarkConfig":{"plugins":["remark-preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"b8c00a3164ee6e0dbadf65e8e14f6137e0345a07","homepage":"https://github.com/micromark/micromark-extension-gfm-strikethrough#readme","_id":"micromark-extension-gfm-strikethrough@1.0.7","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-sX0FawVE1o3abGk3vRjOH50L5TTLr3b5XMqnP9YDRb34M0v5OoZhG+OHFz1OffZ9dlwgpTBKaT4XW/AsUVnSDw==","shasum":"c8212c9a616fa3bf47cb5c711da77f4fdc2f80af","tarball":"http://registry-npm.ywwl.com/micromark-extension-gfm-strikethrough/download/micromark-extension-gfm-strikethrough-1.0.7.tgz","fileCount":15,"unpackedSize":28686,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEV7KyRIivp9UmigmPLH1Ppqdv93vdV1PF7WR8G/FOC+AiEAtFO84mBjZc7WPobmLspuIuRDHlgKAecVc/r1qzoGQV8="}],"size":6834,"noattachment":false,"key":"/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.7.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-extension-gfm-strikethrough_1.0.7_1685461271792_0.6017009034069907"},"_hasShrinkwrap":false,"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","publish_time":1685461271970,"_cnpm_publish_time":1685461271970,"dist-tags":{"latest":"2.1.0"}}