{"id":23446059,"url":"https://github.com/micromark/micromark-extension-gfm","last_synced_at":"2025-04-13T15:11:34.885Z","repository":{"id":41523437,"uuid":"296414812","full_name":"micromark/micromark-extension-gfm","owner":"micromark","description":"micromark extension to support GFM (GitHub Flavored Markdown)","archived":false,"fork":false,"pushed_at":"2023-06-26T17:08:14.000Z","size":135,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-05-03T05:19:04.106Z","etag":null,"topics":["autolink","flavored","footnote","gfm","github","markdown","micromark","micromark-extension","strikethrough","table","tagfilter","tasklist"],"latest_commit_sha":null,"homepage":"https://unifiedjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micromark.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"unifiedjs","open_collective":"unified"}},"created_at":"2020-09-17T18:49:27.000Z","updated_at":"2024-06-18T15:14:45.122Z","dependencies_parsed_at":"2024-06-18T15:14:43.612Z","dependency_job_id":"07909347-be79-49c3-8251-d98599bbb39d","html_url":"https://github.com/micromark/micromark-extension-gfm","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":"0.014285714285714235","last_synced_commit":"d4d848ba0cf6ffc8ce29f897bceda8dee4f2612f"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromark%2Fmicromark-extension-gfm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromark%2Fmicromark-extension-gfm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromark%2Fmicromark-extension-gfm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromark%2Fmicromark-extension-gfm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micromark","download_url":"https://codeload.github.com/micromark/micromark-extension-gfm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732484,"owners_count":21152852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autolink","flavored","footnote","gfm","github","markdown","micromark","micromark-extension","strikethrough","table","tagfilter","tasklist"],"created_at":"2024-12-23T20:29:28.199Z","updated_at":"2025-04-13T15:11:34.856Z","avatar_url":"https://github.com/micromark.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":[],"sub_categories":[],"readme":"# micromark-extension-gfm\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 [GitHub flavored markdown][gfm] (GFM).\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  * [`gfm(options?)`](#gfmoptions)\n  * [`gfmHtml(options?)`](#gfmhtmloptions)\n  * [`Options`](#options)\n  * [`HtmlOptions`](#htmloptions)\n* [Bugs](#bugs)\n* [Authoring](#authoring)\n* [HTML](#html)\n* [CSS](#css)\n* [Syntax](#syntax)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package contains extensions that add support for all features enabled by\nGFM to [`micromark`][micromark].\nIt supports autolink literals, footnotes, strikethrough, tables, tagfilter, and\ntasklists.\n\n## When to use this\n\nThis project is useful when you want to support GFM in markdown.\n\nYou can use these extensions when you are working with [`micromark`][micromark].\nAlternatively, you can also use the underlying features separately:\n\n* [`micromark-extension-gfm-autolink-literal`][gfm-autolink-literal]\n  — support GFM [autolink literals][]\n* [`micromark-extension-gfm-footnote`][gfm-footnote]\n  — support GFM [footnotes][]\n* [`micromark-extension-gfm-strikethrough`][gfm-strikethrough]\n  — support GFM [strikethrough][]\n* [`micromark-extension-gfm-table`][gfm-table]\n  — support GFM [tables][]\n* [`micromark-extension-gfm-tagfilter`][gfm-tagfilter]\n  — support GFM [tagfilter][]\n* [`micromark-extension-gfm-task-list-item`][gfm-task-list-item]\n  — support GFM [tasklists][]\n\nWhen you need a syntax tree, combine this package with\n[`mdast-util-gfm`][mdast-util-gfm].\n\nAll these packages are used in [`remark-gfm`][remark-gfm], which focuses on\nmaking it 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\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {gfm, gfmHtml} from 'https://esm.sh/micromark-extension-gfm@3'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {gfm, gfmHtml} from 'https://esm.sh/micromark-extension-gfm@3?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nSay our document `example.md` contains:\n\n```markdown\n# GFM\n\n## Autolink literals\n\nwww.example.com, https://example.com, and contact@example.com.\n\n## Footnote\n\nA note[^1]\n\n[^1]: Big note.\n\n## Strikethrough\n\n~one~ or ~~two~~ tildes.\n\n## Table\n\n| a | b  |  c |  d  |\n| - | :- | -: | :-: |\n\n## Tag filter\n\n\u003cplaintext\u003e\n\n## Tasklist\n\n* [ ] to do\n* [x] done\n```\n\n…and our module `example.js` looks as follows:\n\n```js\nimport fs from 'node:fs/promises'\nimport {micromark} from 'micromark'\nimport {gfm, gfmHtml} from 'micromark-extension-gfm'\n\nconst output = micromark(await fs.readFile('example.md'), {\n  allowDangerousHtml: true,\n  extensions: [gfm()],\n  htmlExtensions: [gfmHtml()]\n})\n\nconsole.log(output)\n```\n\n…now running `node example.js` yields:\n\n```html\n\u003ch1\u003eGFM\u003c/h1\u003e\n\u003ch2\u003eAutolink literals\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"http://www.example.com\"\u003ewww.example.com\u003c/a\u003e, \u003ca href=\"https://example.com\"\u003ehttps://example.com\u003c/a\u003e, and \u003ca href=\"mailto:contact@example.com\"\u003econtact@example.com\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003eFootnote\u003c/h2\u003e\n\u003cp\u003eA note\u003csup\u003e\u003ca href=\"#user-content-fn-1\" id=\"user-content-fnref-1\" data-footnote-ref=\"\" aria-describedby=\"footnote-label\"\u003e1\u003c/a\u003e\u003c/sup\u003e\u003c/p\u003e\n\u003ch2\u003eStrikethrough\u003c/h2\u003e\n\u003cp\u003e\u003cdel\u003eone\u003c/del\u003e or \u003cdel\u003etwo\u003c/del\u003e tildes.\u003c/p\u003e\n\u003ch2\u003eTable\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003ea\u003c/th\u003e\n\u003cth align=\"left\"\u003eb\u003c/th\u003e\n\u003cth align=\"right\"\u003ec\u003c/th\u003e\n\u003cth align=\"center\"\u003ed\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003c/table\u003e\n\u003ch2\u003eTag filter\u003c/h2\u003e\n\u0026lt;plaintext\u003e\n\u003ch2\u003eTasklist\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cinput type=\"checkbox\" disabled=\"\" /\u003e to do\u003c/li\u003e\n\u003cli\u003e\u003cinput type=\"checkbox\" disabled=\"\" checked=\"\" /\u003e done\u003c/li\u003e\n\u003c/ul\u003e\n\u003csection data-footnotes=\"\" class=\"footnotes\"\u003e\u003ch2 id=\"footnote-label\" class=\"sr-only\"\u003eFootnotes\u003c/h2\u003e\n\u003col\u003e\n\u003cli id=\"user-content-fn-1\"\u003e\n\u003cp\u003eBig note. \u003ca href=\"#user-content-fnref-1\" data-footnote-backref=\"\" class=\"data-footnote-backref\" aria-label=\"Back to content\"\u003e↩\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/section\u003e\n```\n\n## API\n\nThis package exports the identifiers [`gfm`][api-gfm] and\n[`gfmHtml`][api-gfm-html].\nThere is no default export.\n\nThe separate extensions support the [`development` condition][development].\nRun `node --conditions development module.js` to get instrumented dev code.\nWithout this condition, production code is loaded.\n\n### `gfm(options?)`\n\nCreate an extension for `micromark` to enable GFM syntax.\n\n###### Parameters\n\n* `options` ([`Options`][api-options], optional)\n  — configuration; passed to\n  [`micromark-extens-gfm-strikethrough`][gfm-strikethrough-options]\n\n###### Returns\n\nExtension for `micromark` that can be passed in `extensions` to enable GFM\nsyntax ([`Extension`][micromark-extension]).\n\n### `gfmHtml(options?)`\n\nCreate an extension for `micromark` to support GFM when serializing to HTML.\n\n###### Parameters\n\n* `options` ([`HtmlOptions`][api-html-options], optional)\n  — configuration; passed to\n  [`micromark-extens-gfm-footnote`][gfm-footnote-html-options]\n\n###### Returns\n\nExtension for `micromark` that can be passed in `htmlExtensions` to support GFM\nwhen serializing to HTML ([`HtmlExtension`][micromark-html-extension]).\n\n### `Options`\n\nConfiguration for syntax (TypeScript type).\n\n###### Type\n\n```ts\nexport type {Options} from 'micromark-extension-gfm-strikethrough'\n```\n\n[See `Options`][gfm-strikethrough-options].\n\n### `HtmlOptions`\n\nConfiguration for HTML (TypeScript type).\n\n###### Type\n\n```ts\nexport type {HtmlOptions} from 'micromark-extension-gfm-footnote'\n```\n\n[See `HtmlOptions`][gfm-footnote-html-options].\n\n## Bugs\n\nFor bugs present in GFM but not here, or other peculiarities that are\nsupported, see each corresponding readme:\n\n* [autolink literal](https://github.com/micromark/micromark-extension-gfm-autolink-literal#bugs)\n* [footnote](https://github.com/micromark/micromark-extension-gfm-footnote#bugs)\n* strikethrough: n/a\n* [table](https://github.com/micromark/micromark-extension-gfm-table#bugs)\n* tagfilter: n/a\n* tasklists: n/a\n\n## Authoring\n\nFor recommendations on how to author GFM, see each corresponding readme:\n\n* [autolink literal](https://github.com/micromark/micromark-extension-gfm-autolink-literal#authoring)\n* [footnote](https://github.com/micromark/micromark-extension-gfm-footnote#authoring)\n* [strikethrough](https://github.com/micromark/micromark-extension-gfm-strikethrough#authoring)\n* [table](https://github.com/micromark/micromark-extension-gfm-table#authoring)\n* tagfilter: n/a\n* [tasklists](https://github.com/micromark/micromark-extension-gfm-task-list-item#authoring)\n\n## HTML\n\nFor info on what HTML features GFM relates to, see each corresponding readme:\n\n* [autolink literal](https://github.com/micromark/micromark-extension-gfm-autolink-literal#html)\n* [footnote](https://github.com/micromark/micromark-extension-gfm-footnote#html)\n* [strikethrough](https://github.com/micromark/micromark-extension-gfm-strikethrough#html)\n* [table](https://github.com/micromark/micromark-extension-gfm-table#html)\n* [tagfilter](https://github.com/micromark/micromark-extension-gfm-tagfilter#html)\n* [tasklists](https://github.com/micromark/micromark-extension-gfm-task-list-item#html)\n\n## CSS\n\nFor info on how GitHub styles these features, see each corresponding readme:\n\n* [autolink literal](https://github.com/micromark/micromark-extension-gfm-autolink-literal#css)\n* [footnote](https://github.com/micromark/micromark-extension-gfm-footnote#css)\n* [strikethrough](https://github.com/micromark/micromark-extension-gfm-strikethrough#css)\n* [table](https://github.com/micromark/micromark-extension-gfm-table#css)\n* tagfilter: n/a\n* [tasklists](https://github.com/micromark/micromark-extension-gfm-task-list-item#css)\n\n## Syntax\n\nFor info on the syntax of these features, see each corresponding readme:\n\n* [autolink literal](https://github.com/micromark/micromark-extension-gfm-autolink-literal#syntax)\n* [footnote](https://github.com/micromark/micromark-extension-gfm-footnote#syntax)\n* [strikethrough](https://github.com/micromark/micromark-extension-gfm-strikethrough#syntax)\n* [table](https://github.com/micromark/micromark-extension-gfm-table#syntax)\n* tagfilter: n/a\n* [tasklists](https://github.com/micromark/micromark-extension-gfm-task-list-item#syntax)\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types [`HtmlOptions`][api-html-options] and\n[`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@^3`, compatible with Node.js 16.\n\nThis package works with `micromark` version `3` and later.\n\n## Security\n\nThis package is safe.\nSetting `clobberPrefix = ''` is dangerous, it opens you up to DOM clobbering.\nThe `labelTagName` and `labelAttributes` options are unsafe when used with user\ncontent, they allow defining arbitrary HTML.\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\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/micromark/micromark-extension-gfm/workflows/main/badge.svg\n\n[build]: https://github.com/micromark/micromark-extension-gfm/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark-extension-gfm.svg\n\n[coverage]: https://codecov.io/github/micromark/micromark-extension-gfm\n\n[downloads-badge]: https://img.shields.io/npm/dm/micromark-extension-gfm.svg\n\n[downloads]: https://www.npmjs.com/package/micromark-extension-gfm\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size\u0026query=$.size.compressedSize\u0026url=https://deno.bundlejs.com/?q=micromark-extension-gfm\n\n[size]: https://bundlejs.com/?q=micromark-extension-gfm\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[development]: https://nodejs.org/api/packages.html#packages_resolving_user_conditions\n\n[typescript]: https://www.typescriptlang.org\n\n[gfm]: https://github.github.com/gfm/\n\n[strikethrough]: https://github.github.com/gfm/#strikethrough-extension-\n\n[tables]: https://github.github.com/gfm/#tables-extension-\n\n[tasklists]: https://github.github.com/gfm/#task-list-items-extension-\n\n[autolink literals]: https://github.github.com/gfm/#autolinks-extension-\n\n[tagfilter]: https://github.github.com/gfm/#disallowed-raw-html-extension-\n\n[footnotes]: https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/\n\n[micromark]: https://github.com/micromark/micromark\n\n[micromark-extension]: https://github.com/micromark/micromark#syntaxextension\n\n[micromark-html-extension]: https://github.com/micromark/micromark#htmlextension\n\n[gfm-strikethrough]: https://github.com/micromark/micromark-extension-gfm-strikethrough\n\n[gfm-strikethrough-options]: https://github.com/micromark/micromark-extension-gfm-strikethrough#options\n\n[gfm-autolink-literal]: https://github.com/micromark/micromark-extension-gfm-autolink-literal\n\n[gfm-footnote]: https://github.com/micromark/micromark-extension-gfm-footnote\n\n[gfm-footnote-html-options]: https://github.com/micromark/micromark-extension-gfm-footnote#htmloptions\n\n[gfm-table]: https://github.com/micromark/micromark-extension-gfm-table\n\n[gfm-tagfilter]: https://github.com/micromark/micromark-extension-gfm-tagfilter\n\n[gfm-task-list-item]: https://github.com/micromark/micromark-extension-gfm-task-list-item\n\n[remark-gfm]: https://github.com/remarkjs/remark-gfm\n\n[mdast-util-gfm]: https://github.com/syntax-tree/mdast-util-gfm\n\n[api-gfm]: #gfmoptions\n\n[api-gfm-html]: #gfmhtmloptions\n\n[api-options]: #options\n\n[api-html-options]: #htmloptions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicromark%2Fmicromark-extension-gfm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicromark%2Fmicromark-extension-gfm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicromark%2Fmicromark-extension-gfm/lists"}