[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".github/workflows/bb.yml",
    "content": "jobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: unifiedjs/beep-boop-beta@main\n        with:\n          repo-token: ${{secrets.GITHUB_TOKEN}}\nname: bb\non:\n  issues:\n    types: [closed, edited, labeled, opened, reopened, unlabeled]\n  pull_request_target:\n    types: [closed, edited, labeled, opened, reopened, unlabeled]\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "jobs:\n  canary:\n    name: canary / ${{matrix.package}}\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: node\n      - run: npm install\n      - run: npm run build\n      - uses: actions/checkout@v4\n        with:\n          path: canary/${{matrix.package}}\n          repository: ${{matrix.package}}\n      - run: |\n          npm install\n          for package in $(ls ../../packages); do\n            npx rimraf \"node_modules/**/$package\"\n          done\n          npm test\n        working-directory: canary/${{matrix.package}}\n    strategy:\n      fail-fast: false\n      max-parallel: 2\n      matrix:\n        package:\n          - remarkjs/react-markdown\n          - remarkjs/remark-gfm\n  main:\n    name: ${{matrix.node}}\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: ${{matrix.node}}\n      - run: npm install\n      - run: npm test\n      - uses: codecov/codecov-action@v5\n    strategy:\n      matrix:\n        node:\n          - lts/hydrogen\n          - node\nname: main\non:\n  - pull_request\n  - push\n"
  },
  {
    "path": ".gitignore",
    "content": "*.d.ts\n*.log\n*.map\n*.tsbuildinfo\n.DS_Store\ncoverage/\nnode_modules/\nyarn.lock\n!/packages/remark-parse/index.d.ts\n!/packages/remark-stringify/index.d.ts\n!/packages/remark/index.d.ts\n"
  },
  {
    "path": ".mailmap",
    "content": "Titus Wormer <tituswormer@gmail.com>\nIsaac Z. Schlueter <i@izs.me>\nKomatsu Seiji <skomatsu.comutt@gmail.com>\nCyril Lakech <cyril.lakech@adeoservices.com>\nZack Bonebrake <info@gigonaut.com>\nOmeid Matten <public@omeid.me>\nPatrick Bartsch <bartsch98@gmail.com>\nChris Wren <cthewren@gmail.com>\nTsuyusato Kitsune <make.just.on@gmail.com>\nMasahiro Miyashiro <3846masahiro+git@gmail.com>\nTom MacWright <tom@macwright.org> Tom MacWright <tmcw@users.noreply.github.com>\nMin RK <benjaminrk@gmail.com> MinRK <benjaminrk@gmail.com>\nNick Baugh <niftylettuce@gmail.com>\nAlex Leon <alexleon@domain.com.au>\n\n# User names only.\nanonymous (Niggler) <foo@bar.org>\nanonymous (Mithgol) <getgit@mithgol.ru>\nanonymous (insanehong) <intro957@gmail.com>\n"
  },
  {
    "path": ".npmrc",
    "content": "ignore-scripts=true\npackage-lock=false\n"
  },
  {
    "path": ".prettierignore",
    "content": "coverage/\n*.md\n"
  },
  {
    "path": "changelog.md",
    "content": "# Changelog\n\nSee [GitHub Releases][releases] for the changelog.\n\n[releases]: https://github.com/remarkjs/remark/releases\n"
  },
  {
    "path": "doc/getting-started.md",
    "content": "# Getting started\n\nSee [the monorepo readme][remark] for what the remark ecosystem is and examples\nof how to get started.\n\n[remark]: https://github.com/remarkjs/remark\n"
  },
  {
    "path": "doc/plugins.md",
    "content": "![remark][file-logo]\n\n# Plugins\n\n**remark** is a tool that transforms markdown with plugins.\nSee [the monorepo readme][github-remark] for info on what the remark ecosystem\nis.\nThis page lists existing plugins.\n\n## Contents\n\n* [List of plugins](#list-of-plugins)\n* [List of utilities](#list-of-utilities)\n* [Use plugins](#use-plugins)\n* [Create plugins](#create-plugins)\n\n## List of plugins\n\n<a id=\"list-of-presets\"></a>\n\nFor the most awesome projects in the ecosystem,\nsee [`remarkjs/awesome-remark`][github-remark-awesome-remark].\nMore plugins can be found on GitHub tagged with the\n[`remark-plugin` topic][github-topic-remark-plugin].\n\n> 👉 **Note**:\n> some plugins don’t work with recent versions of remark due to changes in its\n> underlying parser (micromark).\n> Plugins that are up to date or unaffected are marked with `🟢` while plugins\n> that are **currently broken** are marked with `⚠️`.\n\n> 💡 **Tip**:\n> remark plugins work with markdown and **rehype** plugins work with HTML.\n> See [*§ List of plugins* in `rehypejs/rehype`][github-rehype-plugins] for more\n> plugins.\n\n<!--lint disable media-style-->\n\nThe list of plugins:\n\n* [`remark-a11y-emoji`](https://github.com/florianeckerstorfer/remark-a11y-emoji)\n  — accessible emoji\n* ⚠️ [`remark-abbr`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-abbr#readme)\n  — new syntax for abbreviations (new node type, rehype compatible)\n* ⚠️ [`remark-admonitions`](https://github.com/elviswolcott/remark-admonitions)\n  — new syntax for admonitions\n  (👉 **note**: [`remark-directive`][github-remark-directive] is similar and up\n  to date)\n* ⚠️ [`remark-align`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-align#readme)\n  — new syntax to align text or blocks (new node types, rehype\n  compatible)\n* 🟢 [`remark-api`](https://github.com/wooorm/remark-api)\n  — generate an API section\n* ⚠️ [`remark-attr`](https://github.com/arobase-che/remark-attr)\n  — new syntax to add attributes to markdown\n* 🟢 [`remark-behead`](https://github.com/mrzmmr/remark-behead)\n  — increase or decrease heading depth\n* 🟢 [`remark-breaks`](https://github.com/remarkjs/remark-breaks)\n  – hard breaks w/o needing spaces (like on issues)\n* 🟢 [`remark-capitalize`](https://github.com/zeit/remark-capitalize)\n  – transform all titles w/ [`title.sh`](https://github.com/zeit/title)\n* 🟢 [`remark-capitalize-headings`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-capitalize-headings)\n  – selectively capitalize headings\n  (👉 **note**: alternative to [`remark-capitalize`](https://github.com/zeit/remark-capitalize))\n* 🟢 [`remark-cite`](https://github.com/benrbray/remark-cite)\n  – new syntax for Pandoc-style citations\n* 🟢 [`remark-cjk-friendly`](https://github.com/tats-u/markdown-cjk-friendly/tree/main/packages/remark-cjk-friendly)\n  – recognize emphasis in CJK languages ​​more reliably\n* 🟢 [`remark-cjk-friendly-gfm-strikethrough`](https://github.com/tats-u/markdown-cjk-friendly/tree/main/packages/remark-cjk-friendly-gfm-strikethrough)\n  – recognize GFM strikethrough in CJK languages ​​more reliably\n* 🟢 [`remark-cloudinary-docusaurus`](https://github.com/johnnyreilly/remark-cloudinary-docusaurus)\n  – allows Docusaurus to use Cloudinary to serve optimised images\n* 🟢 [`remark-code-blocks`](https://github.com/mrzmmr/remark-code-blocks)\n  — select and store code blocks\n* 🟢 [`remark-code-extra`](https://github.com/samlanning/remark-code-extra)\n  — add to or transform the HTML output of code blocks (rehype compatible)\n* 🟢 [`remark-code-frontmatter`](https://github.com/samlanning/remark-code-frontmatter)\n  — extract frontmatter from code blocks\n* 🟢 [`remark-code-import`](https://github.com/kevin940726/remark-code-import)\n  — populate code blocks from files\n* 🟢 [`remark-code-screenshot`](https://github.com/Swizec/remark-code-screenshot)\n  – turn code blocks into `carbon.now.sh` screenshots\n* 🟢 [`remark-code-title`](https://github.com/kevinzunigacuellar/remark-code-title)\n  — add titles to code blocks\n* 🟢 [`remark-codesandbox`](https://github.com/kevin940726/remark-codesandbox)\n  – create CodeSandbox from code blocks\n* 🟢 [`remark-collapse`](https://github.com/Rokt33r/remark-collapse)\n  — make a section collapsible\n* 🟢 [`remark-comment-config`](https://github.com/remarkjs/remark-comment-config)\n  — configure remark w/ comments\n* ⚠️ [`remark-comments`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-comments#readme)\n  — new syntax to ignore things\n* ⚠️ [`remark-container`](https://github.com/zWingz/remark-container)\n  — new syntax for containers\n  (👉 **note**: [`remark-directive`][github-remark-directive] is similar and up\n  to date)\n* ⚠️ [`remark-containers`](https://github.com/Nevenall/remark-containers)\n  — new syntax for containers\n  (👉 **note**: [`remark-directive`][github-remark-directive] is similar and up\n  to date)\n* 🟢 [`remark-contributors`](https://github.com/remarkjs/remark-contributors)\n  — add a table of contributors\n* 🟢 [`remark-copy-linked-files`](https://github.com/sergioramos/remark-copy-linked-files)\n  — find and copy files linked files to a destination directory\n* 🟢 [`remark-corebc`](https://github.com/bchainhub/remark-corebc)\n  — transforms Core Blockchain notations into markdown links\n* 🟢 [`remark-corepass`](https://github.com/bchainhub/remark-corepass)\n  — transform CorePass notations into markdown links\n* ⚠️ [`remark-custom-blocks`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-custom-blocks#readme)\n  — new syntax for custom blocks (new node types, rehype compatible)\n  (👉 **note**: [`remark-directive`][github-remark-directive] is similar and up\n  to date)\n* 🟢 [`remark-custom-header-id`](https://github.com/sindresorhus/remark-custom-header-id)\n  — add custom ID attribute to headers (`{#some-id}`)\n* 🟢 [`remark-definition-list`](https://github.com/wataru-chocola/remark-definition-list)\n  — support definition lists\n* 🟢 [`remark-defsplit`](https://github.com/remarkjs/remark-defsplit)\n  — change links and images to references w/ separate definitions\n* ⚠️ [`remark-disable-tokenizers`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-disable-tokenizers#readme)\n  — turn some or all remark’s tokenizers on or off\n* 🟢 [`remark-directive`](https://github.com/remarkjs/remark-directive)\n  — new syntax for directives (generic extensions)\n* 🟢 [`remark-directive-rehype`](https://github.com/IGassmann/remark-directive-rehype)\n  — turn [directives][github-remark-directive] into HTML custom elements\n  (rehype compatible)\n* 🟢 [`remark-directive-sugar`](https://github.com/lin-stephanie/remark-directive-sugar)\n  — predefined directives for customizable badges, links, video embeds, and more\n* 🟢 [`remark-docx`](https://github.com/inokawa/remark-docx)\n  — compile markdown to docx\n* 🟢 [`@m2d/remark-docx`](https://github.com/md2docx/remark-docx)\n  — compile markdown to docx with support for GFM, tables, html, and more.\n* 🟢 [`remark-dropcap`](https://github.com/brev/remark-dropcap)\n  — fancy and accessible drop caps\n* 🟢 [`remark-embed-images`](https://github.com/remarkjs/remark-embed-images)\n  — embed local images as base64-encoded data URIs\n* 🟢 [`remark-emoji`](https://github.com/rhysd/remark-emoji)\n  — transform Gemoji short-codes to emoji\n* 🟢 [`remark-extended-table`](https://github.com/wataru-chocola/remark-extended-table)\n  — extended table syntax allowing colspan / rowspan\n* 🟢 [`remark-extract-frontmatter`](https://github.com/mrzmmr/remark-extract-frontmatter)\n  — store front matter in vfiles\n* 🟢 [`remark-fediverse-user`](https://github.com/bchainhub/remark-fediverse-user)\n  — transform Fediverse user notations into markdown links\n* 🟢 [`remark-first-heading`](https://github.com/laat/remark-first-heading)\n  — change the first heading in a document\n* 🟢 [`remark-fix-guillemets`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-fix-guillemets#readme)\n  — support ASCII guillements (`<<`, `>>`) mapping them to HTML\n* 🟢 [`remark-flexible-code-titles`](https://github.com/ipikuka/remark-flexible-code-titles)\n  — add titles or/and containers for code blocks with customizable attributes\n* 🟢 [`remark-flexible-containers`](https://github.com/ipikuka/remark-flexible-containers)\n  — add custom/flexible containers with customizable properties\n* 🟢 [`remark-flexible-markers`](https://github.com/ipikuka/remark-flexible-markers)\n  — add custom/flexible mark element with customizable properties\n* 🟢 [`remark-flexible-paragraphs`](https://github.com/ipikuka/remark-flexible-paragraphs)\n  — add custom/flexible paragraphs with customizable properties\n* 🟢 [`remark-flexible-toc`](https://github.com/ipikuka/remark-flexible-toc)\n  — expose the table of contents (toc) via Vfile.data or an option reference\n* 🟢 [`remark-footnotes-extra`](https://github.com/miaobuao/remark-footnotes-extra)\n  — add footnotes via short syntax\n* 🟢 [`remark-frontmatter`](https://github.com/remarkjs/remark-frontmatter)\n  – support frontmatter (yaml, toml, and more)\n* 🟢 [`remark-gemoji`](https://github.com/remarkjs/remark-gemoji)\n  — better support for Gemoji shortcodes\n* ⚠️ [`remark-generic-extensions`](https://github.com/medfreeman/remark-generic-extensions)\n  — new syntax for the CommonMark generic directive extension\n  (👉 **note**: [`remark-directive`][github-remark-directive] is similar and up\n  to date)\n* 🟢 [`remark-gfm`](https://github.com/remarkjs/remark-gfm)\n  — support GFM (autolink literals, footnotes, strikethrough, tables,\n  tasklists)\n* 🟢 [`remark-git-contributors`](https://github.com/remarkjs/remark-git-contributors)\n  — add a table of contributors based on Git history, options, and more\n* 🟢 [`remark-github`](https://github.com/remarkjs/remark-github)\n  — autolink references to commits, issues, pull-requests, and users\n* 🟢 [`remark-github-admonitions-to-directives`](https://github.com/incentro-dc/remark-github-admonitions-to-directives)\n  — convert GitHub’s blockquote-based admonitions syntax to directives syntax\n* 🟢 [`remark-github-beta-blockquote-admonitions`](https://github.com/myl7/remark-github-beta-blockquote-admonitions)\n  — [GitHub beta blockquote-based admonitions](https://github.com/github/feedback/discussions/16925)\n* 🟢 [`remark-github-blockquote-alert`](https://github.com/jaywcjlove/remark-github-blockquote-alert)\n  — remark plugin to add support for [GitHub Alert](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts)\n* ⚠️ [`remark-grid-tables`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-grid-tables#readme)\n  — new syntax to describe tables (rehype compatible)\n* 🟢 [`@adobe/remark-grid-tables`](https://github.com/adobe/remark-gridtables)\n  — pandoc compatible grid-table syntax\n* 🟢 [`remark-heading-id`](https://github.com/imcuttle/remark-heading-id)\n  — custom heading id support `{#custom-id}`\n* 🟢 [`remark-heading-gap`](https://github.com/remarkjs/remark-heading-gap)\n  — serialize w/ more blank lines between headings\n* 🟢 [`@vcarl/remark-headings`](https://github.com/vcarl/remark-headings)\n  — extract a list of headings as data\n* 🟢 [`remark-hexo`](https://github.com/bennycode/remark-hexo)\n  — renders [Hexo tags](https://hexo.io/docs/tag-plugins)\n* 🟢 [`remark-highlight.js`](https://github.com/remarkjs/remark-highlight.js)\n  — highlight code blocks w/\n  [`highlight.js`](https://github.com/isagalaev/highlight.js)\n  (rehype compatible)\n* 🟢 [`remark-hint`](https://github.com/sergioramos/remark-hint)\n  — add hints/tips/warnings to markdown\n* 🟢 [`remark-html`](https://github.com/remarkjs/remark-html)\n  — serialize markdown as HTML\n* ⚠️ [`remark-iframes`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-iframes#readme)\n  — new syntax to create iframes (new node type, rehype compatible)\n* 🟢 [`remark-ignore`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-ignore)\n  — use comments to exclude nodes from transformation\n* 🟢 [`remark-images`](https://github.com/remarkjs/remark-images)\n  — add an improved image syntax\n* 🟢 [`remark-img-links`](https://github.com/Pondorasti/remark-img-links)\n  — prefix relative image paths with an absolute URL\n* 🟢 [`@it-service-npm/remark-include`](https://github.com/IT-Service-NPM/remark-include)\n  — add `::include{file=path.md}` statements to compose markdown files together\n* 🟢 [`remark-inline-links`](https://github.com/remarkjs/remark-inline-links)\n  — change references and definitions to links and images\n* 🟢 [`remark-ins`](https://github.com/ipikuka/remark-ins)\n  — add ins element for inserted texts opposite to deleted texts\n* 🟢 [`remark-join-cjk-lines`](https://github.com/purefun/remark-join-cjk-lines)\n  — remove extra space between CJK Characters.\n* ⚠️ [`remark-kbd`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-kbd#readme)\n  — new syntax for keyboard keys (new node type, rehype compatible)\n* ⚠️ [`remark-kbd-plus`](https://github.com/twardoch/remark-kbd-plus)\n  — new syntax for keyboard keys w/ plusses (new node type, rehype\n  compatible)\n* 🟢 [`remark-license`](https://github.com/remarkjs/remark-license)\n  — add a license section\n* 🟢 [`remark-link-rewrite`](https://github.com/rjanjic/remark-link-rewrite)\n  — customize link URLs dynamically\n* 🟢 [`remark-linkify-regex`](https://gitlab.com/staltz/remark-linkify-regex)\n  — change text matching a regex to links\n* 🟢 [`remark-lint`](https://github.com/remarkjs/remark-lint)\n  — check markdown code style\n* 🟢 [`remark-man`](https://github.com/remarkjs/remark-man)\n  — serialize markdown as man pages (roff)\n* 🟢 [`remark-math`](https://github.com/remarkjs/remark-math)\n  — new syntax for math (new node types, rehype compatible)\n* 🟢 [`remark-mdx`](https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx)\n  — support MDX (JSX, expressions, ESM)\n* 🟢 [`remark-mentions`](https://github.com/FinnRG/remark-mentions)\n  — replace @ mentions with links\n* 🟢 [`remark-merge-data`](https://github.com/s-h-a-d-o-w/remark-merge-data)\n  — merge globally defined data with data declared across code blocks\n* 🟢 [`remark-mermaidjs`](https://github.com/remcohaszing/remark-mermaidjs)\n  — transform mermaid code blocks into inline SVGs\n* 🟢 [`remark-message-control`](https://github.com/remarkjs/remark-message-control)\n  — turn some or all messages on or off\n* 🟢 [`remark-normalize-headings`](https://github.com/remarkjs/remark-normalize-headings)\n  — make sure at most one top-level heading exists\n* 🟢 [`remark-numbered-footnote-labels`](https://github.com/jackfletch/remark-numbered-footnote-labels)\n  — label footnotes w/ numbers\n* 🟢 [`@agentofuser/remark-oembed`](https://github.com/agentofuser/remark-oembed)\n  — transform URLs for youtube, twitter, etc. embeds\n* 🟢 [`remark-oembed`](https://github.com/sergioramos/remark-oembed)\n  — transform URLs surrounded by newlines into *asynchronously* loading\n  embeds\n* 🟢 [`remark-package-dependencies`](https://github.com/unlight/remark-package-dependencies)\n  — inject your dependencies\n* ⚠️ [`remark-parse-yaml`](https://github.com/landakram/remark-parse-yaml)\n  — parse YAML nodes and expose their value as `parsedValue`\n* 🟢 [`remark-pdf`](https://github.com/inokawa/remark-pdf)\n  — compile markdown to pdf\n* ⚠️ [`remark-ping`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-ping#readme)\n  — new syntax for mentions w/ configurable existence check (new node\n  type, rehype compatible)\n* 🟢 [`remark-plugin-autonbsp`](https://github.com/denisinvader/remark-plugin-autonbsp)\n  —  replace whitespace with non-breaking spaces\n  to avoid hanging articles, prepositions and digits\n* 🟢 [`remark-prepend-url`](https://github.com/alxjpzmn/remark-prepend-url)\n  —  prepend an absolute url to relative links\n* 🟢 [`remark-prettier`](https://github.com/remcohaszing/remark-prettier)\n  — check and format markdown using Prettier\n* 🟢 [`remark-prism`](https://github.com/sergioramos/remark-prism)\n  — highlight code blocks w/ [Prism](https://prismjs.com/) (supporting most\n  Prism plugins)\n* 🟢 [`@handlewithcare/remark-prosemirror`](https://github.com/handlewithcarecollective/remark-prosemirror)\n  — compile markdown to [ProseMirror](https://prosemirror.net/) documents\n* ⚠️ [`remark-redact`](https://github.com/seafoam6/remark-redact)\n  — new syntax to conceal text matching a regex\n* 🟢 [`remark-redactable`](https://github.com/code-dot-org/remark-redactable)\n  — write plugins to redact content from a markdown document,\n  then restore it later\n* 🟢 [`remark-refer-plantuml`](https://github.com/PrinOrange/remark-refer-plantuml)\n  — automatically transform PlantUML code into referenced embeddable image URLs\n* 🟢 [`remark-reference-links`](https://github.com/remarkjs/remark-reference-links)\n  — transform links and images into references and definitions\n* 🟢 [`remark-rehype`](https://github.com/remarkjs/remark-rehype)\n  — transform to [rehype](https://github.com/rehypejs/rehype)\n* 🟢 [`remark-relative-links`](https://github.com/zslabs/remark-relative-links)\n  — change absolute URLs to relative ones\n* 🟢 [`remark-remove-comments`](https://github.com/alvinometric/remark-remove-comments)\n  — remove HTML comments from the processed output\n* 🟢 [`remark-remove-unused-definitions`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-remove-unused-definitions)\n  — remove unused reference-style link definitions\n* 🟢 [`remark-remove-url-trailing-slash`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-remove-url-trailing-slash)\n  — remove trailing slashes from the ends of all URL paths\n* 🟢 [`remark-renumber-references`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-renumber-references)\n  — renumber numeric reference-style link ids contiguously starting from 1\n* 🟢 [`remark-retext`](https://github.com/remarkjs/remark-retext)\n  — transform to [retext](https://github.com/retextjs/retext)\n* 🟢 [`remark-ruby`](https://github.com/laysent/remark-ruby)\n  — new syntax for ruby (furigana)\n* 🟢 [`remark-sectionize`](https://github.com/jake-low/remark-sectionize)\n  — wrap headings and subsequent content in section tags (new node type,\n  rehype compatible)\n* ⚠️ [`remark-shortcodes`](https://github.com/djm/remark-shortcodes)\n  — new syntax for Wordpress- and Hugo-like shortcodes (new node type)\n  (👉 **note**: [`remark-directive`][github-remark-directive] is similar and up\n  to date)\n* 🟢 [`remark-simple-plantuml`](https://github.com/akebifiky/remark-simple-plantuml)\n  — turn PlantUML code blocks to images\n* 🟢 [`remark-slate`](https://github.com/hanford/remark-slate)\n  — compile markdown to [Slate nodes](https://docs.slatejs.org/concepts/02-nodes)\n* 🟢 [`remark-slate-transformer`](https://github.com/inokawa/remark-slate-transformer)\n  — compile markdown to\n  [Slate nodes](https://docs.slatejs.org/concepts/02-nodes)\n  and Slate nodes to markdown\n* 🟢 [`remark-smartypants`](https://github.com/silvenon/remark-smartypants)\n  — SmartyPants\n* 🟢 [`remark-smcat`](https://github.com/shedali/remark-smcat)\n  — state machine cat\n* 🟢 [`remark-sort-definitions`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-sort-definitions)\n  — reorder reference-style link definitions\n* 🟢 [`remark-sources`](https://github.com/unlight/remark-sources)\n  — insert source code\n* 🟢 [`remark-strip-badges`](https://github.com/remarkjs/remark-strip-badges)\n  — remove badges (such as `shields.io`)\n* 🟢 [`remark-strip-html`](https://github.com/craftzdog/remark-strip-html)\n  — remove HTML\n* 🟢 [`remark-squeeze-paragraphs`](https://github.com/remarkjs/remark-squeeze-paragraphs)\n  — remove empty paragraphs\n* ⚠️ [`remark-sub-super`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-sub-super)\n  — new syntax for super- and subscript (new node types, rehype\n  compatible)\n* ⚠️ [`remark-terms`](https://github.com/Nevenall/remark-terms)\n  — new customizable syntax for special terms and phrases\n* 🟢 [`remark-textr`](https://github.com/remarkjs/remark-textr)\n  — transform text w/ [`Textr`](https://github.com/shuvalov-anton/textr)\n* 🟢 [`remark-tight-comments`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-tight-comments)\n  — selectively remove newlines around comments\n* 🟢 [`remark-title`](https://github.com/RichardLitt/remark-title)\n  — check and add the document title\n* 🟢 [`remark-toc`](https://github.com/remarkjs/remark-toc)\n  — add a table of contents\n* 🟢 [`remark-torchlight`](https://github.com/torchlight-api/remark-torchlight)\n  — syntax highlighting powered by [torchlight.dev](https://torchlight.dev)\n* 🟢 [`remark-tree-sitter`](https://github.com/samlanning/remark-tree-sitter)\n  — highlight code blocks in markdown files using\n  [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)\n  (rehype compatible)\n* 🟢 [`remark-truncate-links`](https://github.com/GaiAma/Coding4GaiAma/tree/HEAD/packages/remark-truncate-links)\n  — truncate/shorten urls not manually named\n* 🟢 [`remark-twemoji`](https://github.com/madiodio/remark-twemoji)\n  — turn emoji into [Twemoji](https://github.com/twitter/twemoji)\n* 🟢 [`remark-typedoc-symbol-links`](https://github.com/kamranayub/remark-typedoc-symbol-links)\n  — turn Typedoc symbol link expressions into markdown links\n* 🟢 [`remark-typescript`](https://github.com/trevorblades/remark-typescript)\n  — turn TypeScript code to JavaScript\n* 🟢 [`remark-typograf`](https://github.com/mavrin/remark-typograf)\n  — transform text w/ [Typograf](https://github.com/typograf)\n* 🟢 [`remark-unlink`](https://github.com/remarkjs/remark-unlink)\n  — remove all links, references, and definitions\n* 🟢 [`remark-usage`](https://github.com/remarkjs/remark-usage)\n  — add a usage example\n* 🟢 [`remark-utf8`](https://github.com/Swizec/remark-utf8)\n  — turn bolds, italics, and code into UTF 8 special characters\n* 🟢 [`remark-validate-links`](https://github.com/remarkjs/remark-validate-links)\n  — check links to headings and files\n* ⚠️ [`remark-variables`](https://github.com/mrzmmr/remark-variables)\n  — new syntax for variables\n* 🟢 [`remark-vdom`](https://github.com/remarkjs/remark-vdom)\n  — compile markdown to [VDOM](https://github.com/Matt-Esch/virtual-dom/)\n* 🟢 [`remark-wiki-link`](https://github.com/landakram/remark-wiki-link)\n  — new syntax for wiki links (rehype compatible)\n* 🟢 [`remark-yaml-config`](https://github.com/remarkjs/remark-yaml-config)\n  — configure remark w/ YAML\n\n<!--lint enable media-style-->\n\n## List of utilities\n\nFor things that work with the syntax tree used in remark for markdown,\nsee [*§ List of utilities* in `syntax-tree/mdast`][github-mdast-utilities].\nFor tools that work with **mdast** and other syntax trees,\nsee [*§ List of utilities* in `syntax-tree/unist`][github-unist-utilities].\nFor tools that work with the virtual file format used in remark,\nsee [*§ List of utilities* in `vfile/vfile`][github-vfile-utilities].\n\n## Use plugins\n\nTo use a plugin programmatically (from JavaScript),\ncall the [`use()`][github-unified-use] method.\nTo use plugin with `remark-cli` (from the terminal),\npass a [`--use` flag][github-unified-args-use] or\nspecify it in a\n[configuration file][github-unified-engine-config-files].\n\n## Create plugins\n\nTo create a plugin,\nfirst read up on what they are in\n[*§ Plugin* in `unifiedjs/unified`][github-unified-plugin].\nAfter that read\n[*§ Create a remark plugin* on `unifiedjs.com`][unifiedjs-create-a-plugin]\nfor a practical introduction.\nFinally take one of the existing plugins,\nwhich looks similar to what you’re about to make,\nand work from there.\nIf you get stuck,\n[discussions][health-discussions] is a good place to get help.\n\nYou should pick a name prefixed by `remark-` (such as `remark-lint`).\n**Do not use the `remark-` prefix** if the thing you create doesn’t work with\n`remark().use()`:\nit isn’t a “plugin” and will confuse users.\nIf it works with mdast use `mdast-util-`.\nIf it works with any unist tree use `unist-util-`.\nIf it works with virtual files use `vfile-`.\n\nUse default exports to expose plugins from your packages.\nAdd `remark-plugin` keywords in `package.json`.\nAdd a `remark-plugin` topic to your repo on GitHub.\nCreate a pull request to add the plugin here on this page!\n\n[file-logo]: https://raw.githubusercontent.com/remarkjs/remark/1f338e72/logo.svg?sanitize=true\n\n[github-mdast-utilities]: https://github.com/syntax-tree/mdast#list-of-utilities\n\n[github-rehype-plugins]: https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins\n\n[github-remark]: https://github.com/remarkjs/remark\n\n[github-remark-awesome-remark]: https://github.com/remarkjs/awesome-remark\n\n[github-remark-directive]: https://github.com/remarkjs/remark-directive\n\n[github-topic-remark-plugin]: https://github.com/topics/remark-plugin\n\n[github-unified-args-use]: https://github.com/unifiedjs/unified-args#--use-plugin\n\n[github-unified-engine-config-files]: https://github.com/unifiedjs/unified-engine#config-files\n\n[github-unified-plugin]: https://github.com/unifiedjs/unified#plugin\n\n[github-unified-use]: https://github.com/unifiedjs/unified#processoruseplugin-options\n\n[github-unist-utilities]: https://github.com/syntax-tree/unist#unist-utilities\n\n[github-vfile-utilities]: https://github.com/vfile/vfile#list-of-utilities\n\n[health-discussions]: https://github.com/remarkjs/remark/discussions\n\n[unifiedjs-create-a-plugin]: https://unifiedjs.com/learn/guide/create-a-remark-plugin/\n"
  },
  {
    "path": "doc/products.md",
    "content": "# Products\n\nSee [awesome remark][awesome] for the products using remark.\n\n[awesome]: https://github.com/remarkjs/awesome\n"
  },
  {
    "path": "license",
    "content": "(The MIT License)\n\nCopyright (c) Titus Wormer <tituswormer@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"remark\",\n  \"private\": true,\n  \"license\": \"MIT\",\n  \"homepage\": \"https://remark.js.org\",\n  \"repository\": \"https://github.com/remarkjs/remark\",\n  \"bugs\": \"https://github.com/remarkjs/remark/issues\",\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/unified\"\n  },\n  \"type\": \"module\",\n  \"workspaces\": [\n    \"packages/remark-parse/\",\n    \"packages/remark-stringify/\",\n    \"packages/remark/\",\n    \"packages/remark-cli/\"\n  ],\n  \"devDependencies\": {\n    \"@types/mdast\": \"^4.0.0\",\n    \"@types/node\": \"^22.0.0\",\n    \"c8\": \"^10.0.0\",\n    \"mdast-util-gfm\": \"^3.0.0\",\n    \"micromark-extension-gfm\": \"^3.0.0\",\n    \"prettier\": \"^3.0.0\",\n    \"remark-preset-wooorm\": \"^11.0.0\",\n    \"type-coverage\": \"^2.0.0\",\n    \"typescript\": \"^5.0.0\",\n    \"unified\": \"^11.0.0\",\n    \"unist-util-remove-position\": \"^5.0.0\",\n    \"xo\": \"^0.60.0\"\n  },\n  \"scripts\": {\n    \"build\": \"tsc --build --clean && tsc --build && type-coverage\",\n    \"format\": \"./packages/remark-cli/cli.js --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix\",\n    \"test-api\": \"node --conditions development test.js\",\n    \"test-coverage\": \"c8 --100 --reporter lcov -- npm run test-api\",\n    \"test\": \"npm run build && npm run format && npm run test-coverage\"\n  },\n  \"prettier\": {\n    \"bracketSpacing\": false,\n    \"singleQuote\": true,\n    \"semi\": false,\n    \"tabWidth\": 2,\n    \"trailingComma\": \"none\",\n    \"useTabs\": false\n  },\n  \"remarkConfig\": {\n    \"plugins\": [\n      \"remark-preset-wooorm\",\n      [\n        \"remark-lint-no-html\",\n        false\n      ]\n    ]\n  },\n  \"typeCoverage\": {\n    \"atLeast\": 100,\n    \"strict\": true\n  },\n  \"xo\": {\n    \"prettier\": true,\n    \"rules\": {\n      \"unicorn/prefer-string-replace-all\": \"off\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/remark/.npmrc",
    "content": "ignore-scripts=true\npackage-lock=false\n"
  },
  {
    "path": "packages/remark/index.d.ts",
    "content": "/// <reference types=\"remark-parse\" />\n/// <reference types=\"remark-stringify\" />\n\nimport type {Root} from 'mdast'\nimport type {Processor} from 'unified'\n\n/**\n * Create a new unified processor that already uses `remark-parse` and\n * `remark-stringify`.\n */\nexport const remark: Processor<Root, undefined, undefined, Root, string>\n"
  },
  {
    "path": "packages/remark/index.js",
    "content": "// Note: types exposed from `index.d.ts`\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {unified} from 'unified'\n\n/**\n * Create a new unified processor that already uses `remark-parse` and\n * `remark-stringify`.\n */\nexport const remark = unified().use(remarkParse).use(remarkStringify).freeze()\n"
  },
  {
    "path": "packages/remark/license",
    "content": "(The MIT License)\n\nCopyright (c) Titus Wormer <tituswormer@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "packages/remark/package.json",
    "content": "{\n  \"author\": \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\",\n  \"bugs\": \"https://github.com/remarkjs/remark/issues\",\n  \"contributors\": [\n    \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\"\n  ],\n  \"dependencies\": {\n    \"@types/mdast\": \"^4.0.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.0\"\n  },\n  \"description\": \"markdown processor powered by plugins part of the unified collective\",\n  \"exports\": \"./index.js\",\n  \"files\": [\n    \"index.d.ts\",\n    \"index.js\"\n  ],\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/unified\"\n  },\n  \"homepage\": \"https://remark.js.org\",\n  \"keywords\": [\n    \"abstract\",\n    \"ast\",\n    \"compile\",\n    \"markdown\",\n    \"mdast\",\n    \"parse\",\n    \"process\",\n    \"remark\",\n    \"serialize\",\n    \"stringify\",\n    \"syntax\",\n    \"tree\",\n    \"unified\"\n  ],\n  \"license\": \"MIT\",\n  \"name\": \"remark\",\n  \"repository\": \"https://github.com/remarkjs/remark/tree/main/packages/remark\",\n  \"scripts\": {},\n  \"sideEffects\": false,\n  \"typeCoverage\": {\n    \"atLeast\": 100,\n    \"strict\": true\n  },\n  \"type\": \"module\",\n  \"version\": \"15.0.1\",\n  \"xo\": {\n    \"overrides\": [\n      {\n        \"files\": [\n          \"**/*.d.ts\"\n        ],\n        \"rules\": {\n          \"@typescript-eslint/triple-slash-reference\": \"off\"\n        }\n      }\n    ],\n    \"prettier\": true\n  }\n}\n"
  },
  {
    "path": "packages/remark/readme.md",
    "content": "# remark\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n\n**[unified][github-unified]** processor with support for parsing from markdown\nand serializing to markdown.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`remark()`](#remark-1)\n* [Examples](#examples)\n  * [Example: checking markdown](#example-checking-markdown)\n  * [Example: passing options to `remark-stringify`](#example-passing-options-to-remark-stringify)\n* [Syntax](#syntax)\n* [Syntax tree](#syntax-tree)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [Sponsor](#sponsor)\n* [License](#license)\n\n## What is this?\n\nThis package is a [unified][github-unified] processor with support for parsing\nmarkdown as input and serializing markdown as output by using unified with\n[`remark-parse`][github-remark-parse] and\n[`remark-stringify`][github-remark-stringify].\n\nSee [the monorepo readme][github-remark] for info on what the remark ecosystem\nis.\n\n## When should I use this?\n\nYou can use this package when you want to use unified,\nhave markdown as input,\nand want markdown as output.\nThis package is a shortcut for\n`unified().use(remarkParse).use(remarkStringify)`.\nWhen the input isn’t markdown (meaning you don’t need `remark-parse`) or the\noutput is not markdown (you don’t need `remark-stringify`),\nit’s recommended to use `unified` directly.\n\nWhen you want to inspect and format markdown files in a project on the command\nline,\nyou can use [`remark-cli`][github-remark-cli].\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+),\ninstall with [npm][npm-install]:\n\n```sh\nnpm install remark\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {remark} from 'https://esm.sh/remark@15'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {remark} from 'https://esm.sh/remark@15?bundle'\n</script>\n```\n\n## Use\n\nSay we have the following module `example.js`:\n\n```js\nimport {remark} from 'remark'\nimport remarkToc from 'remark-toc'\n\nconst value = `\n# Pluto\n\nPluto is a dwarf planet in the Kuiper belt.\n\n## Contents\n\n## History\n\n### Discovery\n\nIn the 1840s, Urbain Le Verrier used Newtonian mechanics to predict the position of…\n\n### Name and symbol\n\nThe name Pluto is for the Roman god of the underworld, from a Greek epithet for Hades…\n\n### Planet X disproved\n\nOnce Pluto was found, its faintness and lack of a viewable disc cast doubt…\n\n## Orbit\n\nPluto's orbital period is about 248 years…\n`\n\nconst file = await remark().use(remarkToc).process(value)\n\nconsole.error(String(file))\n```\n\n…running that with `node example.js` yields:\n\n```markdown\n# Pluto\n\nPluto is a dwarf planet in the Kuiper belt.\n\n## Contents\n\n* [History](#history)\n  * [Discovery](#discovery)\n  * [Name and symbol](#name-and-symbol)\n  * [Planet X disproved](#planet-x-disproved)\n* [Orbit](#orbit)\n\n## History\n\n### Discovery\n\nIn the 1840s, Urbain Le Verrier used Newtonian mechanics to predict the position of…\n\n### Name and symbol\n\nThe name Pluto is for the Roman god of the underworld, from a Greek epithet for Hades…\n\n### Planet X disproved\n\nOnce Pluto was found, its faintness and lack of a viewable disc cast doubt…\n\n## Orbit\n\nPluto's orbital period is about 248 years…\n```\n\n## API\n\nThis package exports the identifier [`remark`][api-remark].\nThere is no default export.\n\n### `remark()`\n\nCreate a new unified processor that already uses\n[`remark-parse`][github-remark-parse] and\n[`remark-stringify`][github-remark-stringify].\n\nYou can add more plugins with `use`.\nSee [`unified`][github-unified] for more information.\n\n## Examples\n\n### Example: checking markdown\n\nThe following example checks that markdown code style is consistent and follows\nsome best practices:\n\n```js\nimport {remark} from 'remark'\nimport remarkPresetLintConsistent from 'remark-preset-lint-consistent'\nimport remarkPresetLintRecommended from 'remark-preset-lint-recommended'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await remark()\n  .use(remarkPresetLintConsistent)\n  .use(remarkPresetLintRecommended)\n  .process('1) Hello, _Jupiter_ and *Neptune*!')\n\nconsole.error(reporter(file))\n```\n\nYields:\n\n```text\n1:2           warning Unexpected ordered list marker `)`, expected `.`                                     ordered-list-marker-style remark-lint\n1:25-1:34     warning Unexpected emphasis marker `*`, expected `_`                                         emphasis-marker           remark-lint\n  [cause]:\n    1:11-1:20 info    Emphasis marker style `'_'` first defined for `'consistent'` here                    emphasis-marker           remark-lint\n1:35          warning Unexpected missing final newline character, expected line feed (`\\n`) at end of file final-newline             remark-lint\n\n⚠ 3 warnings\n```\n\n### Example: passing options to `remark-stringify`\n\nWhen you use `remark-stringify` manually you can pass options to `use`.\nBecause `remark-stringify` is already used in `remark` that’s not possible.\nTo define options for `remark-stringify`,\nyou can instead pass options to `data`:\n\n```js\nimport {remark} from 'remark'\n\nconst value = `\n# Moons of Neptune\n\n1. Naiad\n2. Thalassa\n3. Despine\n4. …\n`\n\nconst file = await remark()\n  .data('settings', {\n    bulletOrdered: ')',\n    incrementListMarker: false,\n    setext: true\n  })\n  .process(value)\n\nconsole.log(String(file))\n```\n\nYields:\n\n```markdown\nMoons of Neptune\n================\n\n1) Naiad\n1) Thalassa\n1) Despine\n1) …\n```\n\n## Syntax\n\nMarkdown is parsed and serialized according to CommonMark.\nOther plugins can add support for syntax extensions.\n\n## Syntax tree\n\nThe syntax tree used in remark is [mdast][github-mdast].\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nThere are no extra exported types.\n\nIt also registers `Settings` with `unified`.\nIf you’re passing options with `.data('settings', …)`,\nmake sure to import this package somewhere in your types,\nas that registers the fields.\n\n```js\n/**\n * @import {} from 'remark'\n */\n\nimport {unified} from 'unified'\n\n// @ts-expect-error: `thisDoesNotExist` is not a valid option.\nunified().data('settings', {thisDoesNotExist: false})\n```\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,\nwe drop support for unmaintained versions of Node.\nThis means we try to keep the current release line,\n`remark@15`,\ncompatible with Node.js 16.\n\n## Security\n\nSee [*§ Security* in `remarkjs/remark`][github-remark-security].\n\n## Contribute\n\nSee [`contributing.md`][health-contributing] in [`remarkjs/.github`][health]\nfor ways to get started.\nSee [`support.md`][health-support] for ways to get help.\n\nThis project has a [code of conduct][health-coc].\nBy interacting with this repository,\norganization,\nor community you agree to abide by its terms.\n\n## Sponsor\n\nSupport this effort and give back by sponsoring on [OpenCollective][]!\n\n<table>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://vercel.com\">Vercel</a><br><br>\n  <a href=\"https://vercel.com\"><img src=\"https://avatars1.githubusercontent.com/u/14985020?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://motif.land\">Motif</a><br><br>\n  <a href=\"https://motif.land\"><img src=\"https://avatars1.githubusercontent.com/u/74457950?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.hashicorp.com\">HashiCorp</a><br><br>\n  <a href=\"https://www.hashicorp.com\"><img src=\"https://avatars1.githubusercontent.com/u/761456?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gitbook.com\">GitBook</a><br><br>\n  <a href=\"https://www.gitbook.com\"><img src=\"https://avatars1.githubusercontent.com/u/7111340?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gatsbyjs.org\">Gatsby</a><br><br>\n  <a href=\"https://www.gatsbyjs.org\"><img src=\"https://avatars1.githubusercontent.com/u/12551863?s=256&v=4\" width=\"128\"></a>\n</td>\n</tr>\n<tr valign=\"middle\">\n</tr>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.netlify.com\">Netlify</a><br><br>\n  <!--OC has a sharper image-->\n  <a href=\"https://www.netlify.com\"><img src=\"https://images.opencollective.com/netlify/4087de2/logo/256.png\" width=\"128\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.coinbase.com\">Coinbase</a><br><br>\n  <a href=\"https://www.coinbase.com\"><img src=\"https://avatars1.githubusercontent.com/u/1885080?s=256&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://themeisle.com\">ThemeIsle</a><br><br>\n  <a href=\"https://themeisle.com\"><img src=\"https://avatars1.githubusercontent.com/u/58979018?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://expo.io\">Expo</a><br><br>\n  <a href=\"https://expo.io\"><img src=\"https://avatars1.githubusercontent.com/u/12504344?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://boostnote.io\">Boost Note</a><br><br>\n  <a href=\"https://boostnote.io\"><img src=\"https://images.opencollective.com/boosthub/6318083/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://markdown.space\">Markdown Space</a><br><br>\n  <a href=\"https://markdown.space\"><img src=\"https://images.opencollective.com/markdown-space/e1038ed/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.holloway.com\">Holloway</a><br><br>\n  <a href=\"https://www.holloway.com\"><img src=\"https://avatars1.githubusercontent.com/u/35904294?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\"></td>\n<td width=\"10%\"></td>\n</tr>\n<tr valign=\"middle\">\n<td width=\"100%\" align=\"center\" colspan=\"8\">\n  <br>\n  <a href=\"https://opencollective.com/unified\"><strong>You?</strong></a>\n  <br><br>\n</td>\n</tr>\n</table>\n\n## License\n\n[MIT][file-license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[api-remark]: #remark-1\n\n[author]: https://wooorm.com\n\n[badge-build-image]: https://github.com/remarkjs/remark/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/remarkjs/remark/actions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg\n\n[badge-coverage-url]: https://codecov.io/github/remarkjs/remark\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/remark.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/remark\n\n[badge-size-url]: https://bundlejs.com/?q=remark\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[file-license]: license\n\n[github-mdast]: https://github.com/syntax-tree/mdast\n\n[github-remark]: https://github.com/remarkjs/remark\n\n[github-remark-cli]: https://github.com/remarkjs/remark/tree/main/packages/remark-cli\n\n[github-remark-parse]: https://github.com/remarkjs/remark/tree/main/packages/remark-parse\n\n[github-remark-security]: https://github.com/remarkjs/remark#security\n\n[github-remark-stringify]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify\n\n[github-unified]: https://github.com/unifiedjs/unified\n\n[health]: https://github.com/remarkjs/.github\n\n[health-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[health-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[health-support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[opencollective]: https://opencollective.com/unified\n\n[typescript]: https://www.typescriptlang.org\n"
  },
  {
    "path": "packages/remark/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"references\": [{\"path\": \"../remark-parse/\"}, {\"path\": \"../remark-stringify/\"}]\n}\n"
  },
  {
    "path": "packages/remark-cli/.npmrc",
    "content": "ignore-scripts=true\npackage-lock=false\n"
  },
  {
    "path": "packages/remark-cli/cli.js",
    "content": "#!/usr/bin/env node\n\n/**\n * @typedef Pack\n * @property {string} name\n * @property {string} version\n * @property {string} description\n */\n\nimport fs from 'node:fs/promises'\nimport {resolve} from 'import-meta-resolve'\nimport markdownExtensions from 'markdown-extensions'\nimport {remark} from 'remark'\nimport {args} from 'unified-args'\n\n/** @type {Pack} */\nconst process_ = JSON.parse(\n  String(\n    await fs.readFile(\n      new URL('package.json', resolve('remark', import.meta.url))\n    )\n  )\n)\n\n/** @type {Pack} */\nconst cli = JSON.parse(\n  String(await fs.readFile(new URL('package.json', import.meta.url)))\n)\n\nargs({\n  description: cli.description,\n  extensions: markdownExtensions,\n  ignoreName: '.' + process_.name + 'ignore',\n  name: process_.name,\n  packageField: process_.name + 'Config',\n  pluginPrefix: process_.name,\n  processor: remark,\n  rcName: '.' + process_.name + 'rc',\n  version: [\n    process_.name + ': ' + process_.version,\n    cli.name + ': ' + cli.version\n  ].join(', ')\n})\n"
  },
  {
    "path": "packages/remark-cli/license",
    "content": "(The MIT License)\n\nCopyright (c) Titus Wormer <tituswormer@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "packages/remark-cli/package.json",
    "content": "{\n  \"author\": \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\",\n  \"bin\": {\n    \"remark\": \"cli.js\"\n  },\n  \"bugs\": \"https://github.com/remarkjs/remark/issues\",\n  \"contributors\": [\n    \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\"\n  ],\n  \"dependencies\": {\n    \"import-meta-resolve\": \"^4.0.0\",\n    \"markdown-extensions\": \"^2.0.0\",\n    \"remark\": \"^15.0.0\",\n    \"unified-args\": \"^11.0.0\"\n  },\n  \"description\": \"CLI to process markdown with remark\",\n  \"exports\": [],\n  \"files\": [\n    \"cli.js\"\n  ],\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/unified\"\n  },\n  \"homepage\": \"https://remark.js.org\",\n  \"keywords\": [\n    \"bin\",\n    \"cli\",\n    \"markdown\",\n    \"mdast\",\n    \"remark\",\n    \"unified\"\n  ],\n  \"license\": \"MIT\",\n  \"name\": \"remark-cli\",\n  \"repository\": \"https://github.com/remarkjs/remark/tree/main/packages/remark-cli\",\n  \"scripts\": {},\n  \"typeCoverage\": {\n    \"atLeast\": 100,\n    \"strict\": true\n  },\n  \"type\": \"module\",\n  \"version\": \"12.0.1\",\n  \"xo\": {\n    \"prettier\": true\n  }\n}\n"
  },
  {
    "path": "packages/remark-cli/readme.md",
    "content": "# remark-cli\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n\nCommand line interface to inspect and change markdown files with\n**[remark][github-remark]**.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [CLI](#cli)\n* [Examples](#examples)\n  * [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli)\n  * [Example: config files (JSON, YAML, JS)](#example-config-files-json-yaml-js)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [Sponsor](#sponsor)\n* [License](#license)\n\n## What is this?\n\nThis package is a command line interface (CLI) that you can use in your terminal\nor in npm scripts and the like to inspect and change markdown files.\nThis CLI is built around remark,\nwhich is an ecosystem of plugins that work with markdown as structured data,\nspecifically ASTs (abstract syntax trees).\nYou can choose from the 150+ existing plugins or make your own.\n\nSee [the monorepo readme][github-remark] for info on what the remark ecosystem\nis.\n\n## When should I use this?\n\nYou can use this package when you want to work with the markdown files in your\nproject from the command line.\n`remark-cli` has many options and you can combine it with many plugins,\nso it should be possible to do what you want.\nIf not,\nyou can always use [`remark`][github-remark-core] itself manually in a script.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+),\ninstall with [npm][npm-install]:\n\n```sh\nnpm install remark-cli\n```\n\n## Use\n\nAdd a table of contents with [`remark-toc`][github-remark-toc] to\n`readme.md`:\n\n```sh\nremark --output --use remark-toc readme.md\n```\n\nLint all markdown files in the current directory according to the markdown style\nguide with\n[`remark-preset-lint-markdown-style-guide`][github-markdown-style-guide].\n\n```sh\nremark --use remark-preset-lint-markdown-style-guide .\n```\n\n## CLI\n\nThe interface of `remark-cli` is explained as follows on its help page\n(`remark --help`):\n\n```text\nUsage: remark [options] [path | glob ...]\n\n  CLI to process markdown with remark\n\nOptions:\n\n      --[no-]color                        specify color in report (on by default)\n      --[no-]config                       search for configuration files (on by default)\n  -e  --ext <extensions>                  specify extensions\n      --file-path <path>                  specify path to process as\n  -f  --frail                             exit with 1 on warnings\n  -h  --help                              output usage information\n      --[no-]ignore                       search for ignore files (on by default)\n  -i  --ignore-path <path>                specify ignore file\n      --ignore-path-resolve-from cwd|dir  resolve patterns in `ignore-path` from its directory or cwd\n      --ignore-pattern <globs>            specify ignore patterns\n      --inspect                           output formatted syntax tree\n  -o  --output [path]                     specify output location\n  -q  --quiet                             output only warnings and errors\n  -r  --rc-path <path>                    specify configuration file\n      --report <reporter>                 specify reporter\n  -s  --setting <settings>                specify settings\n  -S  --silent                            output only errors\n      --silently-ignore                   do not fail when given ignored files\n      --[no-]stdout                       specify writing to stdout (on by default)\n  -t  --tree                              specify input and output as syntax tree\n      --tree-in                           specify input as syntax tree\n      --tree-out                          output syntax tree\n  -u  --use <plugins>                     use plugins\n      --verbose                           report extra info for messages\n  -v  --version                           output version number\n  -w  --watch                             watch for changes and reprocess\n\nExamples:\n\n  # Process `input.md`\n  $ remark input.md -o output.md\n\n  # Pipe\n  $ remark < input.md > output.md\n\n  # Rewrite all applicable files\n  $ remark . -o\n```\n\nMore info on all these options is available at\n[`unified-args`][github-unified-args],\nwhich does the work.\n`remark-cli` is `unified-args` preconfigured to:\n\n* load `remark-` plugins\n* search for markdown extensions\n  ([`.md`, `.markdown`, etc][github-markdown-extensions])\n* ignore paths found in\n  [`.remarkignore` files][github-unified-engine-ignore-file]\n* load configuration from\n  [`.remarkrc`, `.remarkrc.js`, etc files and\n  `remarkConfig` in `package.json`s][github-unified-engine-config-file]\n\n## Examples\n\n### Example: checking and formatting markdown on the CLI\n\nThis example checks and formats markdown with `remark-cli`.\nIt assumes you’re in a Node.js package.\n\nInstall the CLI and plugins:\n\n```sh\nnpm install --save-dev remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-toc\n```\n\n…then add an npm script in your `package.json`:\n\n```js\n  /* … */\n  \"scripts\": {\n    /* … */\n    \"format\": \"remark . --output\",\n    /* … */\n  },\n  /* … */\n```\n\n> 💡 **Tip**:\n> add ESLint and such in the `format` script too.\n\nThe above change adds a `format` script,\nwhich can be run with `npm run format`.\nIt runs remark on all markdown files (`.`)\nand rewrites them (`--output`).\nRun `./node_modules/.bin/remark --help` for more info on the CLI.\n\nThen add a `remarkConfig` to your `package.json` to configure remark:\n\n```js\n  /* … */\n  \"remarkConfig\": {\n    \"settings\": {\n      \"bullet\": \"*\", // Use `*` for list item bullets (default)\n      // See <https://github.com/remarkjs/remark/tree/main/packages/remark-stringify> for more options.\n    },\n    \"plugins\": [\n      \"remark-preset-lint-consistent\", // Check that markdown is consistent.\n      \"remark-preset-lint-recommended\", // Few recommended rules.\n      [\n        // Generate a table of contents in `## Contents`\n        \"remark-toc\",\n        {\n          \"heading\": \"contents\"\n        }\n      ]\n    ]\n  },\n  /* … */\n```\n\n> 👉 **Note**:\n> you must remove the comments in the above examples when copy/pasting them as\n> comments are not supported in `package.json` files.\n\nFinally,\nyou can run the npm script to check and format markdown files in your project:\n\n```sh\nnpm run format\n```\n\n### Example: config files (JSON, YAML, JS)\n\nIn the previous example we saw that `remark-cli` was configured from within a\n`package.json` file.\nThat’s a good place when the configuration is relatively short,\nwhen you have a `package.json`,\nand when you don’t need comments\n(which are not allowed in JSON).\n\nYou can also define configuration in separate files in different languages.\nWith the `package.json` config as inspiration,\nhere’s a JavaScript version that can be placed in `.remarkrc.js`:\n\n```js\nimport remarkPresetLintConsistent from 'remark-preset-lint-consistent'\nimport remarkPresetLintRecommended from 'remark-preset-lint-recommended'\nimport remarkToc from 'remark-toc'\n\nconst remarkConfig = {\n  plugins: [\n    remarkPresetLintConsistent, // Check that markdown is consistent.\n    remarkPresetLintRecommended, // Few recommended rules.\n    // Generate a table of contents in `## Contents`\n    [remarkToc, {heading: 'contents'}]\n  ],\n  settings: {\n    bullet: '*' // Use `*` for list item bullets (default)\n    // See <https://github.com/remarkjs/remark/tree/main/packages/remark-stringify> for more options.\n  }\n}\n\nexport default remarkConfig\n```\n\nThis is the same configuration in YAML,\nwhich can be placed in `.remarkrc.yml`:\n\n```yml\nplugins:\n  # Check that markdown is consistent.\n  - remark-preset-lint-consistent\n  # Few recommended rules.\n  - remark-preset-lint-recommended\n  # Generate a table of contents in `## Contents`\n  - - remark-toc\n    - heading: contents\nsettings:\n  bullet: \"*\"\n```\n\nWhen `remark-cli` is about to process a markdown file it’ll search the file\nsystem upwards for configuration files starting at the folder where that file\nexists.\nTake the following file structure as an illustration:\n\n```text\nfolder/\n├─ subfolder/\n│  ├─ .remarkrc.json\n│  └─ file.md\n├─ .remarkrc.js\n├─ package.json\n└─ readme.md\n```\n\nWhen `folder/subfolder/file.md` is processed,\nthe closest config file is `folder/subfolder/.remarkrc.json`.\nFor `folder/readme.md`,\nit’s `folder/.remarkrc.js`.\n\nThe order of precedence is as follows.\nEarlier wins (so in the above file structure `folder/.remarkrc.js` wins over\n`folder/package.json`):\n\n1. `.remarkrc` (JSON)\n2. `.remarkrc.cjs` (CJS)\n3. `.remarkrc.json` (JSON)\n4. `.remarkrc.js` (CJS or ESM, depending on `type: 'module'` in `package.json`)\n5. `.remarkrc.mjs` (ESM)\n6. `.remarkrc.yaml` (YAML)\n7. `.remarkrc.yml` (YAML)\n8. `package.json` with `remarkConfig` field\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,\nwe drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line,\n`remark-cli@12`,\ncompatible with Node.js 16.\n\n## Security\n\nSee [*§ Security* in `remarkjs/remark`][github-remark-security].\n\n## Contribute\n\nSee [`contributing.md`][health-contributing] in [`remarkjs/.github`][health]\nfor ways to get started.\nSee [`support.md`][health-support] for ways to get help.\n\nThis project has a [code of conduct][health-coc].\nBy interacting with this repository,\norganization,\nor community you agree to abide by its terms.\n\n## Sponsor\n\nSupport this effort and give back by sponsoring on [OpenCollective][]!\n\n<table>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://vercel.com\">Vercel</a><br><br>\n  <a href=\"https://vercel.com\"><img src=\"https://avatars1.githubusercontent.com/u/14985020?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://motif.land\">Motif</a><br><br>\n  <a href=\"https://motif.land\"><img src=\"https://avatars1.githubusercontent.com/u/74457950?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.hashicorp.com\">HashiCorp</a><br><br>\n  <a href=\"https://www.hashicorp.com\"><img src=\"https://avatars1.githubusercontent.com/u/761456?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gitbook.com\">GitBook</a><br><br>\n  <a href=\"https://www.gitbook.com\"><img src=\"https://avatars1.githubusercontent.com/u/7111340?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gatsbyjs.org\">Gatsby</a><br><br>\n  <a href=\"https://www.gatsbyjs.org\"><img src=\"https://avatars1.githubusercontent.com/u/12551863?s=256&v=4\" width=\"128\"></a>\n</td>\n</tr>\n<tr valign=\"middle\">\n</tr>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.netlify.com\">Netlify</a><br><br>\n  <!--OC has a sharper image-->\n  <a href=\"https://www.netlify.com\"><img src=\"https://images.opencollective.com/netlify/4087de2/logo/256.png\" width=\"128\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.coinbase.com\">Coinbase</a><br><br>\n  <a href=\"https://www.coinbase.com\"><img src=\"https://avatars1.githubusercontent.com/u/1885080?s=256&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://themeisle.com\">ThemeIsle</a><br><br>\n  <a href=\"https://themeisle.com\"><img src=\"https://avatars1.githubusercontent.com/u/58979018?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://expo.io\">Expo</a><br><br>\n  <a href=\"https://expo.io\"><img src=\"https://avatars1.githubusercontent.com/u/12504344?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://boostnote.io\">Boost Note</a><br><br>\n  <a href=\"https://boostnote.io\"><img src=\"https://images.opencollective.com/boosthub/6318083/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://markdown.space\">Markdown Space</a><br><br>\n  <a href=\"https://markdown.space\"><img src=\"https://images.opencollective.com/markdown-space/e1038ed/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.holloway.com\">Holloway</a><br><br>\n  <a href=\"https://www.holloway.com\"><img src=\"https://avatars1.githubusercontent.com/u/35904294?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\"></td>\n<td width=\"10%\"></td>\n</tr>\n<tr valign=\"middle\">\n<td width=\"100%\" align=\"center\" colspan=\"8\">\n  <br>\n  <a href=\"https://opencollective.com/unified\"><strong>You?</strong></a>\n  <br><br>\n</td>\n</tr>\n</table>\n\n## License\n\n[MIT][file-license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[author]: https://wooorm.com\n\n[badge-build-image]: https://github.com/remarkjs/remark/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/remarkjs/remark/actions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg\n\n[badge-coverage-url]: https://codecov.io/github/remarkjs/remark\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/remark-cli.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-cli\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[file-license]: license\n\n[github-markdown-extensions]: https://github.com/sindresorhus/markdown-extensions\n\n[github-markdown-style-guide]: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide\n\n[github-remark]: https://github.com/remarkjs/remark\n\n[github-remark-core]: https://github.com/remarkjs/remark/tree/main/packages/remark\n\n[github-remark-security]: https://github.com/remarkjs/remark#security\n\n[github-remark-toc]: https://github.com/remarkjs/remark-toc\n\n[github-unified-args]: https://github.com/unifiedjs/unified-args\n\n[github-unified-engine-config-file]: https://github.com/unifiedjs/unified-engine#config-files\n\n[github-unified-engine-ignore-file]: https://github.com/unifiedjs/unified-engine#ignore-files\n\n[health]: https://github.com/remarkjs/.github\n\n[health-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[health-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[health-support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[opencollective]: https://opencollective.com/unified\n"
  },
  {
    "path": "packages/remark-cli/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"references\": [{\"path\": \"../remark/\"}]\n}\n"
  },
  {
    "path": "packages/remark-parse/.npmrc",
    "content": "ignore-scripts=true\npackage-lock=false\n"
  },
  {
    "path": "packages/remark-parse/index.d.ts",
    "content": "import type {Root} from 'mdast'\nimport type {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'\nimport type {Extension as MicromarkExtension} from 'micromark-util-types'\nimport type {Plugin} from 'unified'\nimport type {Options} from './lib/index.js'\n\nexport type {Options} from './lib/index.js'\n\n// Note: we have to use manual types here,\n// instead of getting them from `lib/index.js`,\n// because TS generates wrong types for functions that use `this`.\n// TS makes them into classes which is incorrect.\n/**\n * Add support for parsing from markdown.\n *\n * @this\n *   Unified processor.\n * @param\n *   Configuration (optional).\n * @returns\n *   Nothing.\n */\ndeclare const remarkParse: Plugin<\n  [(Readonly<Options> | null | undefined)?],\n  string,\n  Root\n>\nexport default remarkParse\n\n// Add custom settings supported when `remark-parse` is added.\ndeclare module 'unified' {\n  interface Settings extends Options {}\n\n  interface Data {\n    /**\n     * List of `micromark` extensions to use.\n     *\n     * This type is registered by `remark-parse`.\n     * Values can be registered by remark plugins that extend `micromark` and\n     * `mdast-util-from-markdown`.\n     * See {@linkcode MicromarkExtension | Extension} from\n     * {@linkcode https://github.com/micromark/micromark/tree/main/packages/micromark-util-types | micromark-util-types}.\n     */\n    micromarkExtensions?: Array<MicromarkExtension>\n\n    /**\n     * List of `mdast-util-from-markdown` extensions to use.\n     *\n     * This type is registered by `remark-parse`.\n     * Values can be registered by remark plugins that extend `micromark` and\n     * `mdast-util-from-markdown`.\n     * See {@linkcode FromMarkdownExtension | Extension} from\n     * {@linkcode https://github.com/syntax-tree/mdast-util-from-markdown#extension | mdast-util-from-markdown}.\n     */\n    fromMarkdownExtensions?: Array<\n      Array<FromMarkdownExtension> | FromMarkdownExtension\n    >\n  }\n}\n"
  },
  {
    "path": "packages/remark-parse/index.js",
    "content": "// Note: types exposed from `index.d.ts`.\nexport {default} from './lib/index.js'\n"
  },
  {
    "path": "packages/remark-parse/lib/index.js",
    "content": "/**\n * @import {Root} from 'mdast'\n * @import {Options as FromMarkdownOptions} from 'mdast-util-from-markdown'\n * @import {Processor} from 'unified'\n */\n\n/**\n * @typedef {Omit<FromMarkdownOptions, 'extensions' | 'mdastExtensions'>} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * Aadd support for parsing from markdown.\n *\n * @this {Processor<Root>}\n *   Processor instance.\n * @param {Readonly<Options> | null | undefined} [options]\n *   Configuration (optional).\n * @returns {undefined}\n *   Nothing.\n */\nexport default function remarkParse(options) {\n  const self = this\n\n  /**\n   * @param {string} document\n   * @returns {Root}\n   */\n  self.parser = function (document) {\n    return fromMarkdown(document, {\n      ...self.data('settings'),\n      ...options,\n      // Note: these options are not in the readme.\n      // The goal is for them to be set by plugins on `data` instead of being\n      // passed by users.\n      extensions: self.data('micromarkExtensions') || [],\n      mdastExtensions: self.data('fromMarkdownExtensions') || []\n    })\n  }\n}\n"
  },
  {
    "path": "packages/remark-parse/license",
    "content": "(The MIT License)\n\nCopyright (c) Titus Wormer <tituswormer@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "packages/remark-parse/package.json",
    "content": "{\n  \"author\": \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\",\n  \"bugs\": \"https://github.com/remarkjs/remark/issues\",\n  \"contributors\": [\n    \"Elijah Hamovitz <elijahhamovitz@gmail.com>\",\n    \"Eugene Sharygin <eush77@gmail.com>\",\n    \"Ika <ikatyang@gmail.com>\",\n    \"Junyoung Choi <fluke8259@gmail.com>\",\n    \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\"\n  ],\n  \"dependencies\": {\n    \"@types/mdast\": \"^4.0.0\",\n    \"mdast-util-from-markdown\": \"^2.0.0\",\n    \"micromark-util-types\": \"^2.0.0\",\n    \"unified\": \"^11.0.0\"\n  },\n  \"description\": \"remark plugin to add support for parsing markdown input\",\n  \"exports\": \"./index.js\",\n  \"files\": [\n    \"index.d.ts\",\n    \"index.js\",\n    \"lib/\"\n  ],\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/unified\"\n  },\n  \"homepage\": \"https://remark.js.org\",\n  \"keywords\": [\n    \"abstract\",\n    \"ast\",\n    \"markdown\",\n    \"mdast\",\n    \"parse\",\n    \"plugin\",\n    \"remark\",\n    \"remark-plugin\",\n    \"syntax\",\n    \"tree\",\n    \"unified\"\n  ],\n  \"license\": \"MIT\",\n  \"name\": \"remark-parse\",\n  \"repository\": \"https://github.com/remarkjs/remark/tree/main/packages/remark-parse\",\n  \"scripts\": {},\n  \"sideEffects\": false,\n  \"typeCoverage\": {\n    \"atLeast\": 100,\n    \"strict\": true\n  },\n  \"type\": \"module\",\n  \"version\": \"11.0.0\",\n  \"xo\": {\n    \"overrides\": [\n      {\n        \"files\": [\n          \"**/*.d.ts\"\n        ],\n        \"rules\": {\n          \"@typescript-eslint/array-type\": [\n            \"error\",\n            {\n              \"default\": \"generic\"\n            }\n          ],\n          \"@typescript-eslint/ban-types\": [\n            \"error\",\n            {\n              \"extendDefaults\": true\n            }\n          ],\n          \"@typescript-eslint/consistent-type-definitions\": [\n            \"error\",\n            \"interface\"\n          ]\n        }\n      }\n    ],\n    \"prettier\": true,\n    \"rules\": {\n      \"unicorn/no-this-assignment\": \"off\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/remark-parse/readme.md",
    "content": "# remark-parse\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n\n**[remark][github-remark]** plugin to add support for parsing from markdown.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`unified().use(remarkParse)`](#unifieduseremarkparse)\n* [Examples](#examples)\n  * [Example: support GFM and frontmatter](#example-support-gfm-and-frontmatter)\n  * [Example: turning markdown into a man page](#example-turning-markdown-into-a-man-page)\n* [Syntax](#syntax)\n* [Syntax tree](#syntax-tree)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [Sponsor](#sponsor)\n* [License](#license)\n\n## What is this?\n\nThis package is a [unified][github-unified] ([remark][github-remark])\nplugin that defines how to take markdown as input and turn it into a syntax\ntree.\n\nSee [the monorepo readme][github-remark] for info on what the remark ecosystem\nis.\n\n## When should I use this?\n\nThis plugin adds support to unified for parsing markdown.\nIf you also need to serialize markdown,\nyou can alternatively use [`remark`][github-remark-core],\nwhich combines `unified`,\nthis plugin,\nand [`remark-stringify`][github-remark-stringify].\n\nIf you *just* want to turn markdown into HTML (with maybe a few extensions),\nwe recommend [`micromark`][github-micromark] instead.\nIf you don’t use plugins and want to access the syntax tree,\nyou can directly use\n[`mdast-util-from-markdown`][github-mdast-util-from-markdown].\nremark focusses on making it easier to transform content by abstracting these\ninternals away.\n\nYou can combine this plugin with other plugins to add syntax extensions.\nNotable examples that deeply integrate with it are\n[`remark-gfm`][github-remark-gfm],\n[`remark-mdx`][github-remark-mdx],\n[`remark-frontmatter`][github-remark-frontmatter],\n[`remark-math`][github-remark-math],\nand\n[`remark-directive`][github-remark-directive].\nYou can also use any other [remark plugin][github-remark-plugins]\nafter `remark-parse`.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+),\ninstall with [npm][npm-install]:\n\n```sh\nnpm install remark-parse\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport remarkParse from 'https://esm.sh/remark-parse@11'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import remarkParse from 'https://esm.sh/remark-parse@11?bundle'\n</script>\n```\n\n## Use\n\nSay we have the following module `example.js`:\n\n```js\nimport rehypeStringify from 'rehype-stringify'\nimport remarkGfm from 'remark-gfm'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\n\nconst value = `\n# Mercury\n\n**Mercury** is the first planet from the [Sun](https://en.wikipedia.org/wiki/Sun)\nand the smallest planet in the Solar System.\n`\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkGfm)\n  .use(remarkRehype)\n  .use(rehypeStringify)\n  .process(value)\n\nconsole.log(String(file))\n```\n\n…then running `node example.js` yields:\n\n```html\n<h1>Mercury</h1>\n<p><strong>Mercury</strong> is the first planet from the <a href=\"https://en.wikipedia.org/wiki/Sun\">Sun</a>\nand the smallest planet in the Solar System.</p>\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`remarkParse`][api-remark-parse].\n\n### `unified().use(remarkParse)`\n\nAdd support for parsing from markdown.\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\nNothing (`undefined`).\n\n## Examples\n\n### Example: support GFM and frontmatter\n\nWe support CommonMark by default.\nNon-standard markdown extensions can be enabled with plugins.\n\nThis example shows how to support GFM features\n(autolink literals, footnotes, strikethrough, tables, tasklists)\nand frontmatter (YAML):\n\n```js\nimport rehypeStringify from 'rehype-stringify'\nimport remarkFrontmatter from 'remark-frontmatter'\nimport remarkGfm from 'remark-gfm'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\n\nconst doc = `---\nlayout: solar-system\n---\n\n# Hi ~~Mars~~Venus!\n`\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkFrontmatter)\n  .use(remarkGfm)\n  .use(remarkRehype)\n  .use(rehypeStringify)\n  .process(doc)\n\nconsole.log(String(file))\n```\n\nYields:\n\n```html\n<h1>Hi <del>Mars</del>Venus!</h1>\n```\n\n### Example: turning markdown into a man page\n\nMan pages (short for manual pages) are a way to document CLIs.\nFor an example,\ntype `man git-log` in your terminal.\nThey use an old markup format called roff.\nThere’s a remark plugin,\n[`remark-man`][github-remark-man],\nthat can serialize as roff.\n\nThis example shows how to turn markdown into man pages by using unified with\n`remark-parse` and `remark-man`:\n\n```js\nimport remarkMan from 'remark-man'\nimport remarkParse from 'remark-parse'\nimport {unified} from 'unified'\n\nconst doc = `\n# titan(7) -- largest moon of saturn\n\nTitan is the largest moon…\n`\n\nconst file = await unified().use(remarkParse).use(remarkMan).process(doc)\n\nconsole.log(String(file))\n```\n\nYields:\n\n```roff\n.TH \"TITAN\" \"7\" \"January 2025\" \"\" \"\"\n.SH \"NAME\"\n\\fBtitan\\fR - largest moon of saturn\n.P\nTitan is the largest moon…\n```\n\n## Syntax\n\nMarkdown is parsed according to CommonMark.\nOther plugins can add support for syntax extensions.\nIf you’re interested in extending markdown,\nsee [*§ Extensions* in `micromark/micromark`][github-micromark-extensions].\n\n## Syntax tree\n\nThe syntax tree used in remark is [mdast][github-mdast].\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type `Options` (which is currently empty).\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,\nwe drop support for unmaintained versions of Node.\nThis means we try to keep the current release line,\n`remark-parse@11`,\ncompatible with Node.js 16.\n\n## Security\n\nSee [*§ Security* in `remarkjs/remark`][github-remark-security].\n\n## Contribute\n\nSee [`contributing.md`][health-contributing] in [`remarkjs/.github`][health]\nfor ways to get started.\nSee [`support.md`][health-support] for ways to get help.\n\nThis project has a [code of conduct][health-coc].\nBy interacting with this repository,\norganization,\nor community you agree to abide by its terms.\n\n## Sponsor\n\nSupport this effort and give back by sponsoring on [OpenCollective][]!\n\n<table>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://vercel.com\">Vercel</a><br><br>\n  <a href=\"https://vercel.com\"><img src=\"https://avatars1.githubusercontent.com/u/14985020?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://motif.land\">Motif</a><br><br>\n  <a href=\"https://motif.land\"><img src=\"https://avatars1.githubusercontent.com/u/74457950?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.hashicorp.com\">HashiCorp</a><br><br>\n  <a href=\"https://www.hashicorp.com\"><img src=\"https://avatars1.githubusercontent.com/u/761456?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gitbook.com\">GitBook</a><br><br>\n  <a href=\"https://www.gitbook.com\"><img src=\"https://avatars1.githubusercontent.com/u/7111340?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gatsbyjs.org\">Gatsby</a><br><br>\n  <a href=\"https://www.gatsbyjs.org\"><img src=\"https://avatars1.githubusercontent.com/u/12551863?s=256&v=4\" width=\"128\"></a>\n</td>\n</tr>\n<tr valign=\"middle\">\n</tr>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.netlify.com\">Netlify</a><br><br>\n  <!--OC has a sharper image-->\n  <a href=\"https://www.netlify.com\"><img src=\"https://images.opencollective.com/netlify/4087de2/logo/256.png\" width=\"128\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.coinbase.com\">Coinbase</a><br><br>\n  <a href=\"https://www.coinbase.com\"><img src=\"https://avatars1.githubusercontent.com/u/1885080?s=256&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://themeisle.com\">ThemeIsle</a><br><br>\n  <a href=\"https://themeisle.com\"><img src=\"https://avatars1.githubusercontent.com/u/58979018?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://expo.io\">Expo</a><br><br>\n  <a href=\"https://expo.io\"><img src=\"https://avatars1.githubusercontent.com/u/12504344?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://boostnote.io\">Boost Note</a><br><br>\n  <a href=\"https://boostnote.io\"><img src=\"https://images.opencollective.com/boosthub/6318083/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://markdown.space\">Markdown Space</a><br><br>\n  <a href=\"https://markdown.space\"><img src=\"https://images.opencollective.com/markdown-space/e1038ed/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.holloway.com\">Holloway</a><br><br>\n  <a href=\"https://www.holloway.com\"><img src=\"https://avatars1.githubusercontent.com/u/35904294?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\"></td>\n<td width=\"10%\"></td>\n</tr>\n<tr valign=\"middle\">\n<td width=\"100%\" align=\"center\" colspan=\"8\">\n  <br>\n  <a href=\"https://opencollective.com/unified\"><strong>You?</strong></a>\n  <br><br>\n</td>\n</tr>\n</table>\n\n## License\n\n[MIT][file-license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[api-remark-parse]: #unifieduseremarkparse\n\n[author]: https://wooorm.com\n\n[badge-build-image]: https://github.com/remarkjs/remark/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/remarkjs/remark/actions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg\n\n[badge-coverage-url]: https://codecov.io/github/remarkjs/remark\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/remark-parse.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-parse\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/remark-parse\n\n[badge-size-url]: https://bundlejs.com/?q=remark-parse\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[file-license]: license\n\n[github-mdast]: https://github.com/syntax-tree/mdast\n\n[github-mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown\n\n[github-micromark]: https://github.com/micromark/micromark\n\n[github-micromark-extensions]: https://github.com/micromark/micromark#extensions\n\n[github-remark]: https://github.com/remarkjs/remark\n\n[github-remark-core]: https://github.com/remarkjs/remark/tree/main/packages/remark\n\n[github-remark-directive]: https://github.com/remarkjs/remark-directive\n\n[github-remark-frontmatter]: https://github.com/remarkjs/remark-frontmatter\n\n[github-remark-gfm]: https://github.com/remarkjs/remark-gfm\n\n[github-remark-man]: https://github.com/remarkjs/remark-man\n\n[github-remark-math]: https://github.com/remarkjs/remark-math\n\n[github-remark-mdx]: https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx\n\n[github-remark-plugins]: https://github.com/remarkjs/remark#plugins\n\n[github-remark-security]: https://github.com/remarkjs/remark#security\n\n[github-remark-stringify]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify\n\n[github-unified]: https://github.com/unifiedjs/unified\n\n[health]: https://github.com/remarkjs/.github\n\n[health-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[health-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[health-support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[opencollective]: https://opencollective.com/unified\n\n[typescript]: https://www.typescriptlang.org\n"
  },
  {
    "path": "packages/remark-parse/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\"\n}\n"
  },
  {
    "path": "packages/remark-stringify/.npmrc",
    "content": "ignore-scripts=true\npackage-lock=false\n"
  },
  {
    "path": "packages/remark-stringify/index.d.ts",
    "content": "import type {Root} from 'mdast'\nimport type {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\nimport type {Plugin} from 'unified'\nimport type {Options} from './lib/index.js'\n\nexport type {Options} from './lib/index.js'\n\n// Note: we have to use manual types here,\n// instead of getting them from `lib/index.js`,\n// because TS generates wrong types for functions that use `this`.\n// TS makes them into classes which is incorrect.\n/**\n * Add support for serializing to markdown.\n *\n * @this\n *   Unified processor.\n * @param\n *   Configuration (optional).\n * @returns\n *   Nothing.\n */\ndeclare const remarkStringify: Plugin<\n  [(Readonly<Options> | null | undefined)?],\n  Root,\n  string\n>\nexport default remarkStringify\n\n// Add custom settings supported when `remark-stringify` is added.\ndeclare module 'unified' {\n  interface Settings extends Options {}\n\n  interface Data {\n    /**\n     * List of `mdast-util-to-markdown` extensions to use.\n     *\n     * This type is registered by `remark-stringify`.\n     * Values can be registered by remark plugins that extend\n     * `mdast-util-to-markdown`.\n     * See {@linkcode ToMarkdownExtension | Options} from\n     * {@linkcode https://github.com/syntax-tree/mdast-util-to-markdown#options | mdast-util-to-markdown}.\n     */\n    toMarkdownExtensions?: Array<ToMarkdownExtension>\n  }\n}\n"
  },
  {
    "path": "packages/remark-stringify/index.js",
    "content": "// Note: types exposed from `index.d.ts`.\nexport {default} from './lib/index.js'\n"
  },
  {
    "path": "packages/remark-stringify/lib/index.js",
    "content": "/**\n * @import {Root} from 'mdast'\n * @import {Options as ToMarkdownOptions} from 'mdast-util-to-markdown'\n * @import {Processor} from 'unified'\n */\n\n/**\n * @typedef {Omit<ToMarkdownOptions, 'extensions'>} Options\n */\n\nimport {toMarkdown} from 'mdast-util-to-markdown'\n\n/**\n * Add support for serializing to markdown.\n *\n * @this {Processor<undefined, undefined, undefined, Root, string>}\n *   Processor instance.\n * @param {Readonly<Options> | null | undefined} [options]\n *   Configuration (optional).\n * @returns {undefined}\n *   Nothing.\n */\nexport default function remarkStringify(options) {\n  const self = this\n\n  /**\n   * @param {Root} tree\n   * @returns {string}\n   */\n  self.compiler = function (tree) {\n    return toMarkdown(tree, {\n      ...self.data('settings'),\n      ...options,\n      // Note: this option is not in the readme.\n      // The goal is for it to be set by plugins on `data` instead of being\n      // passed by users.\n      extensions: self.data('toMarkdownExtensions') || []\n    })\n  }\n}\n"
  },
  {
    "path": "packages/remark-stringify/license",
    "content": "(The MIT License)\n\nCopyright (c) Titus Wormer <tituswormer@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "packages/remark-stringify/package.json",
    "content": "{\n  \"author\": \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\",\n  \"bugs\": \"https://github.com/remarkjs/remark/issues\",\n  \"contributors\": [\n    \"Eugene Sharygin <eush77@gmail.com>\",\n    \"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)\"\n  ],\n  \"dependencies\": {\n    \"@types/mdast\": \"^4.0.0\",\n    \"mdast-util-to-markdown\": \"^2.0.0\",\n    \"unified\": \"^11.0.0\"\n  },\n  \"description\": \"remark plugin to add support for serializing markdown\",\n  \"exports\": \"./index.js\",\n  \"files\": [\n    \"index.d.ts\",\n    \"index.js\",\n    \"lib/\"\n  ],\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/unified\"\n  },\n  \"homepage\": \"https://remark.js.org\",\n  \"keywords\": [\n    \"abstract\",\n    \"ast\",\n    \"compile\",\n    \"markdown\",\n    \"markdown\",\n    \"mdast\",\n    \"plugin\",\n    \"remark\",\n    \"remark-plugin\",\n    \"serialize\",\n    \"stringify\",\n    \"syntax\",\n    \"tree\",\n    \"unified\"\n  ],\n  \"license\": \"MIT\",\n  \"name\": \"remark-stringify\",\n  \"repository\": \"https://github.com/remarkjs/remark/tree/main/packages/remark-stringify\",\n  \"scripts\": {},\n  \"sideEffects\": false,\n  \"typeCoverage\": {\n    \"atLeast\": 100,\n    \"strict\": true\n  },\n  \"type\": \"module\",\n  \"version\": \"11.0.0\",\n  \"xo\": {\n    \"overrides\": [\n      {\n        \"files\": [\n          \"**/*.d.ts\"\n        ],\n        \"rules\": {\n          \"@typescript-eslint/array-type\": [\n            \"error\",\n            {\n              \"default\": \"generic\"\n            }\n          ],\n          \"@typescript-eslint/ban-types\": [\n            \"error\",\n            {\n              \"extendDefaults\": true\n            }\n          ],\n          \"@typescript-eslint/consistent-type-definitions\": [\n            \"error\",\n            \"interface\"\n          ]\n        }\n      }\n    ],\n    \"prettier\": true,\n    \"rules\": {\n      \"unicorn/no-this-assignment\": \"off\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/remark-stringify/readme.md",
    "content": "# remark-stringify\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n\n**[remark][github-remark]** plugin to add support for serializing to markdown.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`unified().use(remarkStringify[, options])`](#unifieduseremarkstringify-options)\n  * [`Options`](#options)\n* [Syntax](#syntax)\n* [Syntax tree](#syntax-tree)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [Sponsor](#sponsor)\n* [License](#license)\n\n## What is this?\n\nThis package is a [unified][github-unified] ([remark][github-remark]) plugin\nthat defines how to take a syntax tree as input and turn it into serialized\nmarkdown.\nWhen it’s used,\nmarkdown is serialized as the final result.\n\nSee [the monorepo readme][github-remark] for info on what the remark ecosystem\nis.\n\n## When should I use this?\n\nThis plugin adds support to unified for serializing markdown.\nIf you also need to parse markdown,\nyou can alternatively use [`remark`][github-remark-core],\nwhich combines `unified`,\n[`remark-parse`][github-remark-parse],\nand this plugin.\n\nIf you don’t use plugins and have access to a syntax tree,\nyou can directly use [`mdast-util-to-markdown`][github-mdast-util-to-markdown],\nwhich is used inside this plugin.\nremark focusses on making it easier to transform content by abstracting these\ninternals away.\n\nYou can combine this plugin with other plugins to add syntax extensions.\nNotable examples that deeply integrate with it are\n[`remark-gfm`][github-remark-gfm],\n[`remark-mdx`][github-remark-mdx],\n[`remark-frontmatter`][github-remark-frontmatter],\n[`remark-math`][github-remark-math],\nand [`remark-directive`][github-remark-directive].\nYou can also use any other [remark plugin][github-remark-plugins]\nbefore `remark-stringify`.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+),\ninstall with [npm][npm-install]:\n\n```sh\nnpm install remark-stringify\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport remarkStringify from 'https://esm.sh/remark-stringify@11'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import remarkStringify from 'https://esm.sh/remark-stringify@11?bundle'\n</script>\n```\n\n## Use\n\nSay we have the following module `example.js`:\n\n```js\nimport rehypeParse from 'rehype-parse'\nimport rehypeRemark from 'rehype-remark'\nimport remarkStringify from 'remark-stringify'\nimport {unified} from 'unified'\n\nconst value = `\n<h1>Uranus</h1>\n<p><b>Uranus</b> is the seventh\n<a href=\"/wiki/Planet\" title=\"Planet\">planet</a> from the Sun and is a gaseous\ncyan <a href=\"/wiki/Ice_giant\" title=\"Ice giant\">ice giant</a>.</p>\n`\n\nconst file = await unified()\n  .use(rehypeParse)\n  .use(rehypeRemark)\n  .use(remarkStringify)\n  .process(value)\n\nconsole.log(String(file))\n```\n\n…then running `node example.js` yields:\n\n```markdown\n# Uranus\n\n**Uranus** is the seventh [planet](/wiki/Planet \"Planet\") from the Sun and is a gaseous cyan [ice giant](/wiki/Ice_giant \"Ice giant\").\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`remarkStringify`][api-remark-stringify].\n\n### `unified().use(remarkStringify[, options])`\n\nAdd support for serializing to markdown.\n\n###### Parameters\n\n* `options`\n  ([`Options`][api-options], optional)\n  — configuration\n\n###### Returns\n\nNothing (`undefined`).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n* `bullet` (`'*'`, `'+'`, or `'-'`, default: `'*'`)\n  — marker to use for bullets of items in unordered lists\n* `bulletOther` (`'*'`, `'+'`, or `'-'`, default: `'-'` when `bullet` is\n  `'*'`, `'*'` otherwise)\n  — marker to use in certain cases where the primary bullet doesn’t work;\n  cannot be equal to `bullet`\n* `bulletOrdered` (`'.'` or `')'`, default: `'.'`)\n  — marker to use for bullets of items in ordered lists\n* `closeAtx` (`boolean`, default: `false`)\n  — add the same number of number signs (`#`) at the end of an ATX heading as\n  the opening sequence\n* `emphasis` (`'*'` or `'_'`, default: `'*'`)\n  — marker to use for emphasis\n* `fence` (``'`'`` or `'~'`, default: ``'`'``)\n  — marker to use for fenced code\n* `fences` (`boolean`, default: `true`)\n  — use fenced code always;\n  when `false`,\n  uses fenced code if there is a language defined,\n  if the code is empty,\n  or if it starts or ends in blank lines\n* `handlers` (`Handlers`, optional)\n  — handle particular nodes;\n  see [`mdast-util-to-markdown`][github-mdast-util-to-markdown] for more info\n* `incrementListMarker` (`boolean`, default: `true`)\n  — increment the counter of ordered lists items\n* `join` (`Array<Join>`, optional)\n  — how to join blocks;\n  see [`mdast-util-to-markdown`][github-mdast-util-to-markdown] for more info\n* `listItemIndent` (`'mixed'`, `'one'`, or `'tab'`, default: `'one'`)\n  — how to indent the content of list items;\n  either with the size of the bullet plus one space (when `'one'`),\n  a tab stop (`'tab'`),\n  or depending on the item and its parent list: `'mixed'` uses `'one'` if the\n  item and list are tight and `'tab'` otherwise\n* `quote` (`'\"'` or `\"'\"`, default: `'\"'`)\n  — marker to use for titles\n* `resourceLink` (`boolean`, default: `false`)\n  — always use resource links (`[text](url)`);\n  when `false`, uses autolinks (`<https://example.com>`) when possible\n* `rule` (`'*'`, `'-'`, or `'_'`, default: `'*'`)\n  — marker to use for thematic breaks\n* `ruleRepetition` (`number`, default: `3`, min: `3`)\n  — number of markers to use for thematic breaks\n* `ruleSpaces` (`boolean`, default: `false`)\n  — add spaces between markers in thematic breaks\n* `setext` (`boolean`, default: `false`)\n  — use setext headings when possible;\n  when `true`, uses setext headings (`heading\\n=======`) for non-empty rank 1\n  or 2 headings\n* `strong` (`'*'` or `'_'`, default: `'*'`)\n  — marker to use for strong\n* `tightDefinitions` (`boolean`, default: `false`)\n  — join definitions without a blank line\n* `unsafe` (`Array<Unsafe>`, optional)\n  — schemas that define when characters cannot occur;\n  see [`mdast-util-to-markdown`][github-mdast-util-to-markdown] for more info\n\n<!-- Note: `extensions` intentionally not supported/documented. -->\n\n## Syntax\n\nMarkdown is serialized according to CommonMark but care is taken to format in a\nway that works with most markdown parsers.\nOther plugins can add support for syntax extensions.\n\n## Syntax tree\n\nThe syntax tree used in remark is [mdast][github-mdast].\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\nIt also registers `Settings` with `unified`.\nIf you’re passing options with `.data('settings', …)`,\nmake sure to import this package somewhere in your types,\nas that registers the fields.\n\n```js\n/**\n * @import {} from 'remark-stringify'\n */\n\nimport {unified} from 'unified'\n\n// @ts-expect-error: `thisDoesNotExist` is not a valid option.\nunified().data('settings', {thisDoesNotExist: false})\n```\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,\nwe drop support for unmaintained versions of Node.\nThis means we try to keep the current release line,\n`remark-stringify@11`,\ncompatible with Node.js 16.\n\n## Security\n\nSee [*§ Security* in `remarkjs/remark`][github-remark-security].\n\n## Contribute\n\nSee [`contributing.md`][health-contributing] in [`remarkjs/.github`][health]\nfor ways to get started.\nSee [`support.md`][health-support] for ways to get help.\n\nThis project has a [code of conduct][health-coc].\nBy interacting with this repository,\norganization,\nor community you agree to abide by its terms.\n\n## Sponsor\n\nSupport this effort and give back by sponsoring on [OpenCollective][]!\n\n<table>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://vercel.com\">Vercel</a><br><br>\n  <a href=\"https://vercel.com\"><img src=\"https://avatars1.githubusercontent.com/u/14985020?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://motif.land\">Motif</a><br><br>\n  <a href=\"https://motif.land\"><img src=\"https://avatars1.githubusercontent.com/u/74457950?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.hashicorp.com\">HashiCorp</a><br><br>\n  <a href=\"https://www.hashicorp.com\"><img src=\"https://avatars1.githubusercontent.com/u/761456?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gitbook.com\">GitBook</a><br><br>\n  <a href=\"https://www.gitbook.com\"><img src=\"https://avatars1.githubusercontent.com/u/7111340?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gatsbyjs.org\">Gatsby</a><br><br>\n  <a href=\"https://www.gatsbyjs.org\"><img src=\"https://avatars1.githubusercontent.com/u/12551863?s=256&v=4\" width=\"128\"></a>\n</td>\n</tr>\n<tr valign=\"middle\">\n</tr>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.netlify.com\">Netlify</a><br><br>\n  <!--OC has a sharper image-->\n  <a href=\"https://www.netlify.com\"><img src=\"https://images.opencollective.com/netlify/4087de2/logo/256.png\" width=\"128\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.coinbase.com\">Coinbase</a><br><br>\n  <a href=\"https://www.coinbase.com\"><img src=\"https://avatars1.githubusercontent.com/u/1885080?s=256&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://themeisle.com\">ThemeIsle</a><br><br>\n  <a href=\"https://themeisle.com\"><img src=\"https://avatars1.githubusercontent.com/u/58979018?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://expo.io\">Expo</a><br><br>\n  <a href=\"https://expo.io\"><img src=\"https://avatars1.githubusercontent.com/u/12504344?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://boostnote.io\">Boost Note</a><br><br>\n  <a href=\"https://boostnote.io\"><img src=\"https://images.opencollective.com/boosthub/6318083/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://markdown.space\">Markdown Space</a><br><br>\n  <a href=\"https://markdown.space\"><img src=\"https://images.opencollective.com/markdown-space/e1038ed/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.holloway.com\">Holloway</a><br><br>\n  <a href=\"https://www.holloway.com\"><img src=\"https://avatars1.githubusercontent.com/u/35904294?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\"></td>\n<td width=\"10%\"></td>\n</tr>\n<tr valign=\"middle\">\n<td width=\"100%\" align=\"center\" colspan=\"8\">\n  <br>\n  <a href=\"https://opencollective.com/unified\"><strong>You?</strong></a>\n  <br><br>\n</td>\n</tr>\n</table>\n\n## License\n\n[MIT][file-license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[api-options]: #options\n\n[api-remark-stringify]: #unifieduseremarkstringify-options\n\n[author]: https://wooorm.com\n\n[badge-build-image]: https://github.com/remarkjs/remark/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/remarkjs/remark/actions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg\n\n[badge-coverage-url]: https://codecov.io/github/remarkjs/remark\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/remark-stringify.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-stringify\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/remark-stringify\n\n[badge-size-url]: https://bundlejs.com/?q=remark-stringify\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[file-license]: license\n\n[github-mdast]: https://github.com/syntax-tree/mdast\n\n[github-mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown\n\n[github-remark]: https://github.com/remarkjs/remark\n\n[github-remark-core]: https://github.com/remarkjs/remark/tree/main/packages/remark\n\n[github-remark-directive]: https://github.com/remarkjs/remark-directive\n\n[github-remark-frontmatter]: https://github.com/remarkjs/remark-frontmatter\n\n[github-remark-gfm]: https://github.com/remarkjs/remark-gfm\n\n[github-remark-math]: https://github.com/remarkjs/remark-math\n\n[github-remark-mdx]: https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx\n\n[github-remark-parse]: https://github.com/remarkjs/remark/tree/main/packages/remark-parse\n\n[github-remark-plugins]: https://github.com/remarkjs/remark#plugins\n\n[github-remark-security]: https://github.com/remarkjs/remark#security\n\n[github-unified]: https://github.com/unifiedjs/unified\n\n[health]: https://github.com/remarkjs/.github\n\n[health-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[health-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[health-support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[opencollective]: https://opencollective.com/unified\n\n[typescript]: https://www.typescriptlang.org\n"
  },
  {
    "path": "packages/remark-stringify/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\"\n}\n"
  },
  {
    "path": "readme.md",
    "content": "# ![remark][file-logo]\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n\n**remark** is a tool that transforms markdown with plugins.\nThese plugins can inspect and change your markup.\nYou can use remark on the server,\nthe client,\nCLIs,\ndeno,\netc.\n\n## Feature highlights\n\n* [x] **[compliant][section-syntax]**\n  — 100% to CommonMark,\n  100% to GFM or MDX with a plugin\n* [x] **[ASTs][section-syntax-tree]**\n  — inspecting and changing content made easy\n* [x] **[popular][]**\n  — world’s most popular markdown parser\n* [x] **[plugins][section-plugins]**\n  — 150+ plugins you can pick and choose from\n\n## Intro\n\nremark is an ecosystem of plugins that work with markdown as structured data,\nspecifically ASTs (abstract syntax trees).\nASTs make it easy for programs to deal with markdown.\nWe call those programs plugins.\nPlugins inspect and change trees.\nYou can use the many existing plugins or you can make your own.\n\n* to learn markdown,\n  see this [cheatsheet and tutorial][commonmark-help]\n* for more about us,\n  see [`unifiedjs.com`][unifiedjs]\n* for questions,\n  see [support][health-support]\n* to help,\n  see [contribute][section-contribute] or [sponsor][section-sponsor] below\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Plugins](#plugins)\n* [Examples](#examples)\n  * [Example: turning markdown into HTML](#example-turning-markdown-into-html)\n  * [Example: support for GFM and frontmatter](#example-support-for-gfm-and-frontmatter)\n  * [Example: checking markdown](#example-checking-markdown)\n  * [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli)\n* [Syntax](#syntax)\n* [Syntax tree](#syntax-tree)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [Sponsor](#sponsor)\n* [License](#license)\n\n## What is this?\n\nWith this project and a plugin,\nyou can turn this markdown:\n\n```markdown\n# Hello, *Mercury*!\n```\n\n…into the following HTML:\n\n```html\n<h1>Hello, <em>Mercury</em>!</h1>\n```\n\n<details><summary>Show example code</summary>\n\n```js\nimport rehypeStringify from 'rehype-stringify'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkRehype)\n  .use(rehypeStringify)\n  .process('# Hello, *Mercury*!')\n\nconsole.log(String(file)) // => '<h1>Hello, <em>Mercury</em>!</h1>'\n```\n\n</details>\n\nWith another plugin,\nyou can turn this markdown:\n\n```markdown\n# Hi, Saturn!\n```\n\n…into the following markdown:\n\n```markdown\n## Hi, Saturn!\n```\n\n<details><summary>Show example code</summary>\n\n```js\n/**\n * @import {Root} from 'mdast'\n */\n\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(myRemarkPluginToIncreaseHeadings)\n  .use(remarkStringify)\n  .process('# Hi, Saturn!')\n\nconsole.log(String(file)) // => '## Hi, Saturn!'\n\nfunction myRemarkPluginToIncreaseHeadings() {\n  /**\n   * @param {Root} tree\n   */\n  return function (tree) {\n    visit(tree, function (node) {\n      if (node.type === 'heading') {\n        node.depth++\n      }\n    })\n  }\n}\n```\n\n</details>\n\nYou can use remark for many different things.\n**[unified][github-unified]** is the core project that transforms content with\nASTs.\n**remark** adds support for markdown to unified.\n**[mdast][github-mdast]** is the markdown AST that remark uses.\n\nThis GitHub repository is a monorepo that contains the following packages:\n\n* [`remark-parse`][github-remark-parse]\n  — plugin to take markdown as input and turn it into a syntax tree (mdast)\n* [`remark-stringify`][github-remark-stringify]\n  — plugin to take a syntax tree (mdast) and turn it into markdown as output\n* [`remark`][github-remark-core]\n  — `unified`, `remark-parse`, and `remark-stringify`,\n  useful when input and output are markdown\n* [`remark-cli`][github-remark-cli]\n  — CLI around `remark` to inspect and format markdown in scripts\n\n## When should I use this?\n\nDepending on the input you have and output you want,\nyou can use different parts of remark.\nIf the input is markdown,\nyou can use `remark-parse` with `unified`.\nIf the output is markdown,\nyou can use `remark-stringify` with `unified`.\nIf both the input and output are markdown,\nyou can use `remark` on its own.\nWhen you want to inspect and format markdown files in a project,\nyou can use `remark-cli`.\n\nIf you *just* want to turn markdown into HTML (with maybe a few extensions),\nwe recommend [`micromark`][github-micromark] instead.\n\nIf you don’t use plugins and want to deal with syntax trees manually,\nyou can use [`mdast-util-from-markdown`][github-mdast-util-from-markdown] and\n[`mdast-util-to-markdown`][github-mdast-util-to-markdown].\n\n## Plugins\n\nremark plugins deal with markdown.\nSome popular examples are:\n\n* [`remark-gfm`][github-remark-gfm]\n  — add support for GFM (GitHub flavored markdown)\n* [`remark-lint`][github-remark-lint]\n  — inspect markdown and warn about inconsistencies\n* [`remark-toc`][github-remark-toc]\n  — generate a table of contents\n* [`remark-rehype`][github-remark-rehype]\n  — turn markdown into HTML\n\nThese plugins are exemplary because what they do and how they do it is quite\ndifferent,\nrespectively to extend markdown syntax,\ninspect trees,\nchange trees,\nand transform to other syntax trees.\n\nYou can choose from the 150+ plugins that already exist.\nHere are three good ways to find plugins:\n\n* [`awesome-remark`][github-awesome-remark]\n  — selection of the most awesome projects\n* [List of plugins][file-list-of-plugins]\n  — list of all plugins\n* [`remark-plugin` topic][github-topic-remark-plugin]\n  — any tagged repo on GitHub\n\nSome plugins are maintained by us here in the `@remarkjs` organization while\nothers are maintained by folks elsewhere.\nAnyone can make remark plugins,\nso as always when choosing whether to include\ndependencies in your project,\nmake sure to carefully assess the quality of remark plugins too.\n\n## Examples\n\n### Example: turning markdown into HTML\n\nremark is an ecosystem around markdown.\nA different ecosystem is for HTML:\n[rehype][github-rehype].\nThe following example turns markdown into HTML by combining both ecosystems with\n[`remark-rehype`][github-remark-rehype]:\n\n```js\nimport rehypeSanitize from 'rehype-sanitize'\nimport rehypeStringify from 'rehype-stringify'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkRehype)\n  .use(rehypeSanitize)\n  .use(rehypeStringify)\n  .process('# Hello, Neptune!')\n\nconsole.log(String(file))\n```\n\nYields:\n\n```html\n<h1>Hello, Neptune!</h1>\n```\n\n### Example: support for GFM and frontmatter\n\nremark supports CommonMark by default.\nNon-standard markdown extensions can be enabled with plugins.\nThe following example adds support for GFM\n(autolink literals, footnotes, strikethrough, tables, tasklists)\nand frontmatter (YAML):\n\n```js\nimport rehypeStringify from 'rehype-stringify'\nimport remarkFrontmatter from 'remark-frontmatter'\nimport remarkGfm from 'remark-gfm'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\n\nconst value = `---\nlayout: solar-system\n---\n\n# Hi ~~Mars~~Venus!\n`\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkFrontmatter)\n  .use(remarkGfm)\n  .use(remarkRehype)\n  .use(rehypeStringify)\n  .process(value)\n\nconsole.log(String(file))\n```\n\nYields:\n\n```html\n<h1>Hi <del>Mars</del>Venus!</h1>\n```\n\n### Example: checking markdown\n\nThe following example checks that markdown code style is consistent and follows\nrecommended best practices:\n\n```js\nimport {remark} from 'remark'\nimport remarkPresetLintConsistent from 'remark-preset-lint-consistent'\nimport remarkPresetLintRecommended from 'remark-preset-lint-recommended'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await remark()\n  .use(remarkPresetLintConsistent)\n  .use(remarkPresetLintRecommended)\n  .process('1) Hello, _Jupiter_ and *Neptune*!')\n\nconsole.error(reporter(file))\n```\n\nYields:\n\n```text\n1:2           warning Unexpected ordered list marker `)`, expected `.`                                     ordered-list-marker-style remark-lint\n1:25-1:34     warning Unexpected emphasis marker `*`, expected `_`                                         emphasis-marker           remark-lint\n  [cause]:\n    1:11-1:20 info    Emphasis marker style `'_'` first defined for `'consistent'` here                    emphasis-marker           remark-lint\n1:35          warning Unexpected missing final newline character, expected line feed (`\\n`) at end of file final-newline             remark-lint\n\n⚠ 3 warnings\n```\n\n### Example: checking and formatting markdown on the CLI\n\nThe following example checks and formats markdown with `remark-cli`,\nwhich is the CLI (command line interface) of remark that you can use in your\nterminal.\nThis example assumes you’re in a Node.js package.\n\nFirst,\ninstall the CLI and plugins:\n\n```sh\nnpm install --save-dev remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-toc\n```\n\n…then add an npm script in your `package.json`:\n\n```js\n  /* … */\n  \"scripts\": {\n    /* … */\n    \"format\": \"remark . --output\",\n    /* … */\n  },\n  /* … */\n```\n\n> 💡 **Tip**:\n> add ESLint and such in the `format` script too.\n\nThe above change adds a `format` script,\nwhich can be run with `npm run format`.\nIt runs remark on all markdown files (`.`) and rewrites them (`--output`).\nRun `./node_modules/.bin/remark --help` for more info on the CLI.\n\nThen,\nadd a `remarkConfig` to your `package.json` to configure remark:\n\n```js\n  /* … */\n  \"remarkConfig\": {\n    \"settings\": {\n      \"bullet\": \"*\", // Use `*` for list item bullets (default)\n      // See <https://github.com/remarkjs/remark/tree/main/packages/remark-stringify> for more options.\n    },\n    \"plugins\": [\n      \"remark-preset-lint-consistent\", // Check that markdown is consistent.\n      \"remark-preset-lint-recommended\", // Few recommended rules.\n      [\n        // Generate a table of contents in `## Contents`\n        \"remark-toc\",\n        {\n          \"heading\": \"contents\"\n        }\n      ]\n    ]\n  },\n  /* … */\n```\n\n> 👉 **Note**:\n> you must remove the comments in the above examples when copy/pasting them as\n> comments are not supported in `package.json` files.\n\nFinally,\nyou can run the npm script to check and format markdown files in your project:\n\n```sh\nnpm run format\n```\n\n## Syntax\n\nMarkdown is parsed and serialized according to CommonMark.\nOther plugins can add support for syntax extensions.\n\nWe use [`micromark`][github-micromark] for our parsing.\nSee its documentation for more information on markdown,\nCommonMark,\nand extensions.\n\n## Syntax tree\n\nThe syntax tree used in remark is [mdast][github-mdast].\nIt represents markdown constructs as JSON objects.\n\nThis markdown:\n\n```markdown\n## Hello *Pluto*!\n```\n\n…yields the following tree (positional info remove for brevity):\n\n```js\n{\n  type: 'heading',\n  depth: 2,\n  children: [\n    {type: 'text', value: 'Hello '},\n    {type: 'emphasis', children: [{type: 'text', value: 'Pluto'}]}\n    {type: 'text', value: '!'}\n  ]\n}\n```\n\n## Types\n\nThe remark organization and the unified collective as a whole is fully typed\nwith [TypeScript][].\nTypes for mdast are available in [`@types/mdast`][github-types-mdast].\n\nFor TypeScript to work,\nit is important to type your plugins.\nFor example:\n\n```js\n/**\n * @import {Root} from 'mdast'\n * @import {VFile} from 'vfile'\n */\n\n/**\n * @typedef Options\n *   Configuration.\n * @property {boolean | null | undefined} [someField]\n *   Some option (optional).\n */\n\n/**\n * My plugin.\n *\n * @param {Options | null | undefined} [options]\n *   Configuration (optional).\n * @returns\n *   Transform.\n */\nexport function myRemarkPluginAcceptingOptions(options) {\n  /**\n   * Transform.\n   *\n   * @param {Root} tree\n   *   Tree.\n   * @param {VFile} file\n   *   File\n   * @returns {undefined}\n   *   Nothing.\n   */\n  return function (tree, file) {\n    // Do things.\n  }\n}\n```\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,\nwe drop support for unmaintained versions of Node.\nThis means we try to keep the current release line compatible with Node.js 16.\n\n## Security\n\nAs markdown can be turned into HTML and improper use of HTML can open you up to\n[cross-site scripting (XSS)][wikipedia-xss] attacks,\nuse of remark can be unsafe.\nWhen going to HTML,\nyou will combine remark with **[rehype][github-rehype]**,\nin which case you should use [`rehype-sanitize`][github-rehype-sanitize].\n\nAnother security aspect is DDoS attacks.\nAn attacker could cause a crash or slow down with big files.\nCrashes can also originate from smaller payloads,\noften when thousands of things (such as lists or links) are opened.\nIt is wise to cap the accepted size of input\n(500kb can hold a big book)\nand to process content in a different thread or worker so that it can be\nstopped when needed.\n\nUse of remark plugins could also open you up to other attacks.\nCarefully assess each plugin and the risks involved in using them.\n\nFor info on how to submit a report,\nsee our [security policy][health-security].\n\n## Contribute\n\nSee [`contributing.md`][health-contributing] in [`remarkjs/.github`][health]\nfor ways to get started.\nSee [`support.md`][health-support] for ways to get help.\n\nThis project has a [code of conduct][health-coc].\nBy interacting with this repository,\norganization,\nor community you agree to abide by its terms.\n\n## Sponsor\n\nSupport this effort and give back by sponsoring on [OpenCollective][]!\n\n<table>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://vercel.com\">Vercel</a><br><br>\n  <a href=\"https://vercel.com\"><img src=\"https://avatars1.githubusercontent.com/u/14985020?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://motif.land\">Motif</a><br><br>\n  <a href=\"https://motif.land\"><img src=\"https://avatars1.githubusercontent.com/u/74457950?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.hashicorp.com\">HashiCorp</a><br><br>\n  <a href=\"https://www.hashicorp.com\"><img src=\"https://avatars1.githubusercontent.com/u/761456?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gitbook.com\">GitBook</a><br><br>\n  <a href=\"https://www.gitbook.com\"><img src=\"https://avatars1.githubusercontent.com/u/7111340?s=256&v=4\" width=\"128\"></a>\n</td>\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.gatsbyjs.org\">Gatsby</a><br><br>\n  <a href=\"https://www.gatsbyjs.org\"><img src=\"https://avatars1.githubusercontent.com/u/12551863?s=256&v=4\" width=\"128\"></a>\n</td>\n</tr>\n<tr valign=\"middle\">\n</tr>\n<tr valign=\"middle\">\n<td width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\">\n  <a href=\"https://www.netlify.com\">Netlify</a><br><br>\n  <!--OC has a sharper image-->\n  <a href=\"https://www.netlify.com\"><img src=\"https://images.opencollective.com/netlify/4087de2/logo/256.png\" width=\"128\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.coinbase.com\">Coinbase</a><br><br>\n  <a href=\"https://www.coinbase.com\"><img src=\"https://avatars1.githubusercontent.com/u/1885080?s=256&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://themeisle.com\">ThemeIsle</a><br><br>\n  <a href=\"https://themeisle.com\"><img src=\"https://avatars1.githubusercontent.com/u/58979018?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://expo.io\">Expo</a><br><br>\n  <a href=\"https://expo.io\"><img src=\"https://avatars1.githubusercontent.com/u/12504344?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://boostnote.io\">Boost Note</a><br><br>\n  <a href=\"https://boostnote.io\"><img src=\"https://images.opencollective.com/boosthub/6318083/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://markdown.space\">Markdown Space</a><br><br>\n  <a href=\"https://markdown.space\"><img src=\"https://images.opencollective.com/markdown-space/e1038ed/logo/128.png\" width=\"64\"></a>\n</td>\n<td width=\"10%\" align=\"center\">\n  <a href=\"https://www.holloway.com\">Holloway</a><br><br>\n  <a href=\"https://www.holloway.com\"><img src=\"https://avatars1.githubusercontent.com/u/35904294?s=128&v=4\" width=\"64\"></a>\n</td>\n<td width=\"10%\"></td>\n<td width=\"10%\"></td>\n</tr>\n<tr valign=\"middle\">\n<td width=\"100%\" align=\"center\" colspan=\"8\">\n  <br>\n  <a href=\"https://opencollective.com/unified\"><strong>You?</strong></a>\n  <br><br>\n</td>\n</tr>\n</table>\n\n## License\n\n[MIT](license) © [Titus Wormer](https://wooorm.com)\n\n<!-- Definitions -->\n\n[badge-build-image]: https://github.com/remarkjs/remark/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/remarkjs/remark/actions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg\n\n[badge-coverage-url]: https://codecov.io/github/remarkjs/remark\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/remark.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/remark\n\n[badge-size-url]: https://bundlejs.com/?q=remark\n\n[commonmark-help]: https://commonmark.org/help/\n\n[file-list-of-plugins]: doc/plugins.md#list-of-plugins\n\n[file-logo]: https://raw.githubusercontent.com/remarkjs/remark/1f338e72/logo.svg?sanitize=true\n\n[github-awesome-remark]: https://github.com/remarkjs/awesome-remark\n\n[github-mdast]: https://github.com/syntax-tree/mdast\n\n[github-mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown\n\n[github-mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown\n\n[github-micromark]: https://github.com/micromark/micromark\n\n[github-rehype]: https://github.com/rehypejs/rehype\n\n[github-rehype-sanitize]: https://github.com/rehypejs/rehype-sanitize\n\n[github-remark-cli]: https://github.com/remarkjs/remark/tree/main/packages/remark-cli\n\n[github-remark-core]: https://github.com/remarkjs/remark/tree/main/packages/remark\n\n[github-remark-gfm]: https://github.com/remarkjs/remark-gfm\n\n[github-remark-lint]: https://github.com/remarkjs/remark-lint\n\n[github-remark-parse]: https://github.com/remarkjs/remark/tree/main/packages/remark-parse\n\n[github-remark-rehype]: https://github.com/remarkjs/remark-rehype\n\n[github-remark-stringify]: packages/remark-stringify/\n\n[github-remark-toc]: https://github.com/remarkjs/remark-toc\n\n[github-topic-remark-plugin]: https://github.com/topics/remark-plugin\n\n[github-types-mdast]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast\n\n[github-unified]: https://github.com/unifiedjs/unified\n\n[health]: https://github.com/remarkjs/.github\n\n[health-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[health-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[health-security]: https://github.com/remarkjs/.github/blob/main/security.md\n\n[health-support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[opencollective]: https://opencollective.com/unified\n\n[popular]: https://www.npmtrends.com/remark-parse-vs-marked-vs-micromark-vs-markdown-it\n\n[section-contribute]: #contribute\n\n[section-plugins]: #plugins\n\n[section-sponsor]: #sponsor\n\n[section-syntax]: #syntax\n\n[section-syntax-tree]: #syntax-tree\n\n[typescript]: https://www.typescriptlang.org\n\n[unifiedjs]: https://unifiedjs.com\n\n[wikipedia-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n"
  },
  {
    "path": "test.js",
    "content": "import assert from 'node:assert/strict'\nimport {exec as execCallback} from 'node:child_process'\nimport test from 'node:test'\nimport {promisify} from 'node:util'\nimport {fileURLToPath} from 'node:url'\nimport {gfmFromMarkdown, gfmToMarkdown} from 'mdast-util-gfm'\nimport {gfm} from 'micromark-extension-gfm'\nimport {remark} from 'remark'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {unified} from 'unified'\nimport {removePosition} from 'unist-util-remove-position'\n\nconst exec = promisify(execCallback)\n\ntest('remark', async function (t) {\n  await t.test('should expose the public api', async function () {\n    assert.deepEqual(Object.keys(await import('remark')).sort(), ['remark'])\n  })\n\n  await t.test('should process a file', async function () {\n    assert.equal(remark().processSync('*foo*').toString(), '*foo*\\n')\n  })\n\n  await t.test('should accept settings', async function () {\n    assert.equal(\n      remark()\n        .data('settings', {closeAtx: true})\n        .processSync('# foo')\n        .toString(),\n      '# foo #\\n'\n    )\n  })\n})\n\ntest('remark-cli', async function (t) {\n  const binary = fileURLToPath(\n    new URL('packages/remark-cli/cli.js', import.meta.url)\n  )\n\n  await t.test('should show help on `--help`', async function () {\n    const result = await exec(binary + ' --help')\n\n    assert.equal(\n      result.stdout,\n      [\n        'Usage: remark [options] [path | glob ...]',\n        '',\n        '  CLI to process markdown with remark',\n        '',\n        'Options:',\n        '',\n        '      --[no-]color                        specify color in report (on by default)',\n        '      --[no-]config                       search for configuration files (on by default)',\n        '  -e  --ext <extensions>                  specify extensions',\n        '      --file-path <path>                  specify path to process as',\n        '  -f  --frail                             exit with 1 on warnings',\n        '  -h  --help                              output usage information',\n        '      --[no-]ignore                       search for ignore files (on by default)',\n        '  -i  --ignore-path <path>                specify ignore file',\n        '      --ignore-path-resolve-from cwd|dir  resolve patterns in `ignore-path` from its directory or cwd',\n        '      --ignore-pattern <globs>            specify ignore patterns',\n        '      --inspect                           output formatted syntax tree',\n        '  -o  --output [path]                     specify output location',\n        '  -q  --quiet                             output only warnings and errors',\n        '  -r  --rc-path <path>                    specify configuration file',\n        '      --report <reporter>                 specify reporter',\n        '  -s  --setting <settings>                specify settings',\n        '  -S  --silent                            output only errors',\n        '      --silently-ignore                   do not fail when given ignored files',\n        '      --[no-]stdout                       specify writing to stdout (on by default)',\n        '  -t  --tree                              specify input and output as syntax tree',\n        '      --tree-in                           specify input as syntax tree',\n        '      --tree-out                          output syntax tree',\n        '  -u  --use <plugins>                     use plugins',\n        '      --verbose                           report extra info for messages',\n        '  -v  --version                           output version number',\n        '  -w  --watch                             watch for changes and reprocess',\n        '',\n        'Examples:',\n        '',\n        '  # Process `input.md`',\n        '  $ remark input.md -o output.md',\n        '',\n        '  # Pipe',\n        '  $ remark < input.md > output.md',\n        '',\n        '  # Rewrite all applicable files',\n        '  $ remark . -o',\n        ''\n      ].join('\\n')\n    )\n  })\n\n  await t.test('should show version on `--version`', async function () {\n    const result = await exec(binary + ' --version')\n\n    assert.match(result.stdout, /remark: \\d+\\.\\d+\\.\\d+/)\n    assert.match(result.stdout, /remark-cli: \\d+\\.\\d+\\.\\d+/)\n  })\n})\n\ntest('remark-parse', async function (t) {\n  await t.test('should expose the public api', async function () {\n    assert.deepEqual(Object.keys(await import('remark-parse')).sort(), [\n      'default'\n    ])\n  })\n\n  await t.test('should parse', async function () {\n    assert.deepEqual(unified().use(remarkParse).parse('Alfred'), {\n      type: 'root',\n      children: [\n        {\n          type: 'paragraph',\n          children: [\n            {\n              type: 'text',\n              value: 'Alfred',\n              position: {\n                start: {line: 1, column: 1, offset: 0},\n                end: {line: 1, column: 7, offset: 6}\n              }\n            }\n          ],\n          position: {\n            start: {line: 1, column: 1, offset: 0},\n            end: {line: 1, column: 7, offset: 6}\n          }\n        }\n      ],\n      position: {\n        start: {line: 1, column: 1, offset: 0},\n        end: {line: 1, column: 7, offset: 6}\n      }\n    })\n  })\n\n  await t.test('should support extensions', function () {\n    const tree = unified()\n      .data('micromarkExtensions', [gfm()])\n      .data('fromMarkdownExtensions', [gfmFromMarkdown()])\n      .use(remarkParse)\n      .parse('* [x] contact@example.com ~~strikethrough~~')\n\n    removePosition(tree, {force: true})\n\n    assert.deepEqual(tree, {\n      type: 'root',\n      children: [\n        {\n          type: 'list',\n          ordered: false,\n          start: null,\n          spread: false,\n          children: [\n            {\n              type: 'listItem',\n              spread: false,\n              checked: true,\n              children: [\n                {\n                  type: 'paragraph',\n                  children: [\n                    {\n                      type: 'link',\n                      title: null,\n                      url: 'mailto:contact@example.com',\n                      children: [{type: 'text', value: 'contact@example.com'}]\n                    },\n                    {type: 'text', value: ' '},\n                    {\n                      type: 'delete',\n                      children: [{type: 'text', value: 'strikethrough'}]\n                    }\n                  ]\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    })\n  })\n})\n\ntest('remark-stringify', async function (t) {\n  await t.test('should expose the public api', async function () {\n    assert.deepEqual(Object.keys(await import('remark-stringify')).sort(), [\n      'default'\n    ])\n  })\n\n  await t.test('should serialize', async function () {\n    assert.equal(\n      unified()\n        .use(remarkStringify)\n        .stringify({\n          type: 'root',\n          children: [\n            {type: 'paragraph', children: [{type: 'text', value: 'Alfred'}]}\n          ]\n        }),\n      'Alfred\\n'\n    )\n  })\n\n  await t.test('should support extensions', async function () {\n    const result = unified()\n      .data('toMarkdownExtensions', [gfmToMarkdown()])\n      .use(remarkStringify)\n      .stringify({\n        type: 'root',\n        children: [\n          {\n            type: 'heading',\n            depth: 1,\n            children: [{type: 'text', value: 'GFM'}]\n          },\n          {\n            type: 'heading',\n            depth: 2,\n            children: [{type: 'text', value: 'Autolink literals'}]\n          },\n          {\n            type: 'paragraph',\n            children: [\n              {\n                type: 'link',\n                title: null,\n                url: 'http://www.example.com',\n                children: [{type: 'text', value: 'www.example.com'}]\n              },\n              {type: 'text', value: ', '},\n              {\n                type: 'link',\n                title: null,\n                url: 'https://example.com',\n                children: [{type: 'text', value: 'https://example.com'}]\n              },\n              {type: 'text', value: ', and '},\n              {\n                type: 'link',\n                title: null,\n                url: 'mailto:contact@example.com',\n                children: [{type: 'text', value: 'contact@example.com'}]\n              },\n              {type: 'text', value: '.'}\n            ]\n          },\n          {\n            type: 'heading',\n            depth: 2,\n            children: [{type: 'text', value: 'Strikethrough'}]\n          },\n          {\n            type: 'paragraph',\n            children: [\n              {\n                type: 'delete',\n                children: [{type: 'text', value: 'one'}]\n              },\n              {type: 'text', value: ' or '},\n              {\n                type: 'delete',\n                children: [{type: 'text', value: 'two'}]\n              },\n              {type: 'text', value: ' tildes.'}\n            ]\n          },\n          {\n            type: 'heading',\n            depth: 2,\n            children: [{type: 'text', value: 'Table'}]\n          },\n          {\n            type: 'table',\n            align: [null, 'left', 'right', 'center'],\n            children: [\n              {\n                type: 'tableRow',\n                children: [\n                  {type: 'tableCell', children: [{type: 'text', value: 'a'}]},\n                  {type: 'tableCell', children: [{type: 'text', value: 'b'}]},\n                  {type: 'tableCell', children: [{type: 'text', value: 'c'}]},\n                  {type: 'tableCell', children: [{type: 'text', value: 'd'}]}\n                ]\n              }\n            ]\n          },\n          {\n            type: 'heading',\n            depth: 2,\n            children: [{type: 'text', value: 'Tasklist'}]\n          },\n          {\n            type: 'list',\n            ordered: false,\n            start: undefined,\n            spread: false,\n            children: [\n              {\n                type: 'listItem',\n                spread: false,\n                checked: false,\n                children: [\n                  {\n                    type: 'paragraph',\n                    children: [{type: 'text', value: 'to do'}]\n                  }\n                ]\n              },\n              {\n                type: 'listItem',\n                spread: false,\n                checked: true,\n                children: [\n                  {\n                    type: 'paragraph',\n                    children: [{type: 'text', value: 'done'}]\n                  }\n                ]\n              }\n            ]\n          }\n        ]\n      })\n\n    assert.equal(\n      result,\n      [\n        '# GFM',\n        '',\n        '## Autolink literals',\n        '',\n        '[www.example.com](http://www.example.com), <https://example.com>, and <contact@example.com>.',\n        '',\n        '## Strikethrough',\n        '',\n        '~~one~~ or ~~two~~ tildes.',\n        '',\n        '## Table',\n        '',\n        '| a | b  |  c |  d  |',\n        '| - | :- | -: | :-: |',\n        '',\n        '## Tasklist',\n        '',\n        '* [ ] to do',\n        '* [x] done',\n        ''\n      ].join('\\n')\n    )\n  })\n})\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"checkJs\": true,\n    \"customConditions\": [\"development\"],\n    \"declarationMap\": true,\n    \"declaration\": true,\n    \"emitDeclarationOnly\": true,\n    \"exactOptionalPropertyTypes\": true,\n    \"lib\": [\"es2022\"],\n    \"module\": \"node16\",\n    \"strict\": true,\n    \"target\": \"es2022\"\n  },\n  \"exclude\": [\"**/coverage/\", \"**/node_modules/\"],\n  \"include\": [\n    \"**/*.js\",\n    \"packages/remark/index.d.ts\",\n    \"packages/remark-parse/index.d.ts\",\n    \"packages/remark-stringify/index.d.ts\"\n  ]\n}\n"
  }
]