{"id":13591150,"url":"https://github.com/syntax-tree/mdast-util-to-markdown","last_synced_at":"2025-05-14T23:04:57.083Z","repository":{"id":37210851,"uuid":"294192816","full_name":"syntax-tree/mdast-util-to-markdown","owner":"syntax-tree","description":"mdast utility to serialize markdown","archived":false,"fork":false,"pushed_at":"2025-02-11T11:29:43.000Z","size":374,"stargazers_count":112,"open_issues_count":2,"forks_count":23,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-05T23:38:31.500Z","etag":null,"topics":["compile","markdown","mdast","mdast-util","serialize","stringify","unist"],"latest_commit_sha":null,"homepage":"http://unifiedjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syntax-tree.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"unifiedjs","open_collective":"unified","thanks_dev":"u/gh/syntax-tree"}},"created_at":"2020-09-09T18:13:52.000Z","updated_at":"2025-05-05T02:01:05.000Z","dependencies_parsed_at":"2024-06-18T12:37:44.678Z","dependency_job_id":"871ad08b-c1a3-4a4a-94fa-3ce7645eb5bf","html_url":"https://github.com/syntax-tree/mdast-util-to-markdown","commit_stats":{"total_commits":200,"total_committers":4,"mean_commits":50.0,"dds":"0.020000000000000018","last_synced_commit":"d0b9be9fe178210b1684fe07dcef3ddc5ec54ab2"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntax-tree%2Fmdast-util-to-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntax-tree%2Fmdast-util-to-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntax-tree%2Fmdast-util-to-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syntax-tree%2Fmdast-util-to-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syntax-tree","download_url":"https://codeload.github.com/syntax-tree/mdast-util-to-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253042655,"owners_count":21845187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compile","markdown","mdast","mdast-util","serialize","stringify","unist"],"created_at":"2024-08-01T16:00:54.159Z","updated_at":"2025-05-14T23:04:52.060Z","avatar_url":"https://github.com/syntax-tree.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified","https://thanks.dev/u/gh/syntax-tree"],"categories":["JavaScript"],"sub_categories":[],"readme":"# mdast-util-to-markdown\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[mdast][github-mdast]** utility that turns a syntax tree into 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  * [`toMarkdown(tree[, options])`](#tomarkdowntree-options)\n  * [`defaultHandlers`](#defaulthandlers)\n  * [`ConstructName`](#constructname)\n  * [`ConstructNameMap`](#constructnamemap)\n  * [`Handle`](#handle)\n  * [`Handlers`](#handlers)\n  * [`Info`](#info)\n  * [`Join`](#join)\n  * [`Map`](#map)\n  * [`Options`](#options)\n  * [`SafeConfig`](#safeconfig)\n  * [`State`](#state)\n  * [`Tracker`](#tracker)\n  * [`Unsafe`](#unsafe)\n* [List of extensions](#list-of-extensions)\n* [Syntax](#syntax)\n* [Syntax tree](#syntax-tree)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Related](#related)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package is a utility that takes an [mdast][github-mdast]\nsyntax tree as input and turns it into serialized markdown.\n\nThis utility is a low level project.\nIt’s used in [`remark-stringify`][github-remark-stringify],\nwhich focusses on making it easier to transform content by abstracting\nthese internals away.\n\n## When should I use this?\n\nIf you want to handle syntax trees manually, use this.\nFor an easier time processing content, use the **[remark][github-remark]**\necosystem instead.\n\nYou can combine this utility with other utilities to add syntax extensions.\nNotable examples that deeply integrate with it are\n[`mdast-util-gfm`][github-mdast-util-gfm],\n[`mdast-util-mdx`][github-mdast-util-mdx],\n[`mdast-util-frontmatter`][github-mdast-util-frontmatter],\n[`mdast-util-math`][github-mdast-util-math], and\n[`mdast-util-directive`][github-mdast-util-directive].\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install mdast-util-to-markdown\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {toMarkdown} from 'https://esm.sh/mdast-util-to-markdown@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {toMarkdown} from 'https://esm.sh/mdast-util-to-markdown@2?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nSay our module `example.js` looks as follows:\n\n```js\n/**\n * @import {Root} from 'mdast'\n */\n\nimport {toMarkdown} from 'mdast-util-to-markdown'\n\n/** @type {Root} */\nconst tree = {\n  type: 'root',\n  children: [\n    {\n      type: 'blockquote',\n      children: [\n        {type: 'thematicBreak'},\n        {\n          type: 'paragraph',\n          children: [\n            {type: 'text', value: '- a\\nb !'},\n            {\n              type: 'link',\n              url: 'example.com',\n              children: [{type: 'text', value: 'd'}]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n\nconsole.log(toMarkdown(tree))\n```\n\n…now running `node example.js` yields:\n\n```markdown\n\u003e ***\n\u003e\n\u003e \\- a\n\u003e b \\![d](example.com)\n```\n\n\u003e 👉 **Note**: observe the properly escaped characters which would otherwise\n\u003e turn into a list and image respectively.\n\n## API\n\nThis package exports the identifiers [`defaultHandlers`][api-default-handlers]\nand [`toMarkdown`][api-to-markdown].\nThere is no default export.\n\n### `toMarkdown(tree[, options])`\n\nTurn an **[mdast][github-mdast]** syntax tree into markdown.\n\n###### Parameters\n\n* `tree` ([`Node`][github-mdast-nodes])\n  — tree to serialize\n* `options` ([`Options`][api-options], optional)\n  — configuration\n\n###### Returns\n\nSerialized markdown representing `tree` (`string`).\n\n### `defaultHandlers`\n\nDefault (CommonMark) handlers ([`Handlers`][api-handlers]).\n\n### `ConstructName`\n\nConstruct names for things generated by `mdast-util-to-markdown` (TypeScript\ntype).\n\nThis is an enum of strings, each being a semantic label, useful to know when\nserializing whether we’re for example in a double (`\"`) or single (`'`) quoted\ntitle.\n\n###### Type\n\n```ts\ntype ConstructName = ConstructNameMap[keyof ConstructNameMap]\n```\n\n### `ConstructNameMap`\n\nInterface of registered constructs (TypeScript type).\n\n###### Type\n\n```ts\ninterface ConstructNameMap { /* see code */ }\n```\n\nWhen working on extensions that use new constructs, extend the corresponding\ninterface to register its name:\n\n```ts\ndeclare module 'mdast-util-to-markdown' {\n  interface ConstructNameMap {\n    // Register a new construct name (value is used, key should match it).\n    gfmStrikethrough: 'gfmStrikethrough'\n  }\n}\n```\n\n### `Handle`\n\nHandle a particular node (TypeScript type).\n\n###### Parameters\n\n* `node` (`any`)\n  — expected mdast node\n* `parent` ([`Node`][github-mdast-nodes], optional)\n  — parent of `node`\n* `state` ([`State`][api-state])\n  — info passed around about the current state\n* `info` ([`Info`][api-info])\n  — info on the surrounding of the node that is serialized\n\n###### Returns\n\nSerialized markdown representing `node` (`string`).\n\n### `Handlers`\n\nHandle particular nodes (TypeScript type).\n\nEach key is a node type (`Node['type']`), each value its corresponding handler\n([`Handle`][api-handle]).\n\n###### Type\n\n```ts\ntype Handlers = Record\u003cNode['type'], Handle\u003e\n```\n\n### `Info`\n\nInfo on the surrounding of the node that is serialized (TypeScript type).\n\n###### Fields\n\n* `now` ([`Point`][github-unist-point])\n  — current point\n* `lineShift` (`number`)\n  — number of columns each line will be shifted by wrapping nodes\n* `before` (`string`)\n  — characters before this (guaranteed to be one, can be more)\n* `after` (`string`)\n  — characters after this (guaranteed to be one, can be more)\n\n### `Join`\n\nHow to join two blocks (TypeScript type).\n\n“Blocks” are typically joined by one blank line.\nSometimes it’s nicer to have them flush next to each other, yet other times\nthey cannot occur together at all.\n\nJoin functions receive two adjacent siblings and their parent and what they\nreturn defines how many blank lines to use between them.\n\n###### Parameters\n\n* `left` ([`Node`][github-mdast-nodes])\n  — first of two adjacent siblings\n* `right` ([`Node`][github-mdast-nodes])\n  — second of two adjacent siblings\n* `parent` ([`Node`][github-mdast-nodes])\n  — parent of the two siblings\n* `state` ([`State`][api-state])\n  — info passed around about the current state\n\n###### Returns\n\nHow many blank lines to use between the siblings (`boolean`, `number`,\noptional).\n\nWhere `true` is as passing `1` and `false` means the nodes cannot be\njoined by a blank line, such as two adjacent block quotes or indented code\nafter a list, in which case a comment will be injected to break them up:\n\n```markdown\n\u003e Quote 1\n\n\u003c!----\u003e\n\n\u003e Quote 2\n```\n\n\u003e 👉 **Note**: abusing this feature will break markdown.\n\u003e One such example is when returning `0` for two paragraphs, which will result\n\u003e in the text running together, and in the future to be seen as one paragraph.\n\n### `Map`\n\nMap function to pad a single line (TypeScript type).\n\n###### Parameters\n\n* `value` (`string`)\n  — a single line of serialized markdown\n* `line` (`number`)\n  — line number relative to the fragment\n* `blank` (`boolean`)\n  — whether the line is considered blank in markdown\n\n###### Returns\n\nPadded line (`string`).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n##### Fields\n\nThe following fields influence how markdown is serialized.\n\n###### `options.bullet`\n\nMarker to use for bullets of items in unordered lists (`'*'`, `'+'`, or `'-'`,\ndefault: `'*'`).\n\nThere are three cases where the primary bullet cannot be used:\n\n* when three or more list items are on their own, the last one is empty, and\n  `bullet` is also a valid `rule`: `* - +`; this would turn into a thematic\n  break if serialized with three primary bullets; `bulletOther` is used for\n  the last item\n* when a thematic break is the first child of a list item and `bullet` is the\n  same character as `rule`: `- ***`; this would turn into a single thematic\n  break if serialized with primary bullets; `bulletOther` is used for the\n  item\n* when two unordered lists appear next to each other: `* a\\n- b`;\n  `bulletOther` is used for such lists\n\n###### `options.bulletOther`\n\nMarker to use in certain cases where the primary bullet doesn’t work (`'*'`,\n`'+'`, or `'-'`, default: `'-'` when `bullet` is `'*'`, `'*'` otherwise).\n\nCannot be equal to `bullet`.\n\n###### `options.bulletOrdered`\n\nMarker to use for bullets of items in ordered lists (`'.'` or `')'`, default:\n`'.'`).\n\nThere is one case where the primary bullet for ordered items cannot be used:\n\n* when two ordered lists appear next to each other: `1. a\\n2) b`; to solve\n  that, `'.'` will be used when `bulletOrdered` is `')'`, and `'.'` otherwise\n\n###### `options.closeAtx`\n\nWhether to add the same number of number signs (`#`) at the end of an ATX\nheading as the opening sequence (`boolean`, default: `false`).\n\n###### `options.emphasis`\n\nMarker to use for emphasis (`'*'` or `'_'`, default: `'*'`).\n\n###### `options.fence`\n\nMarker to use for fenced code (``'`'`` or `'~'`, default: ``'`'``).\n\n###### `options.fences`\n\nWhether to use fenced code always (`boolean`, default: `true`).\nThe default is to use fenced code if there is a language defined, if the code is\nempty, or if it starts or ends in blank lines.\n\n###### `options.incrementListMarker`\n\nWhether to increment the counter of ordered lists items (`boolean`, default:\n`true`).\n\n###### `options.listItemIndent`\n\nHow to indent the content of list items (`'mixed'`, `'one'`, or `'tab'`,\ndefault: `'one'`).\nEither with the size of the bullet plus one space (when `'one'`), a tab stop\n(`'tab'`), or depending on the item and its parent list (`'mixed'`, uses `'one'`\nif the item and list are tight and `'tab'` otherwise).\n\n###### `options.quote`\n\nMarker to use for titles (`'\"'` or `\"'\"`, default: `'\"'`).\n\n###### `options.resourceLink`\n\nWhether to always use resource links (`boolean`, default: `false`).\nThe default is to use autolinks (`\u003chttps://example.com\u003e`) when possible\nand resource links (`[text](url)`) otherwise.\n\n###### `options.rule`\n\nMarker to use for thematic breaks (`'*'`, `'-'`, or `'_'`, default: `'*'`).\n\n###### `options.ruleRepetition`\n\nNumber of markers to use for thematic breaks (`number`, default: `3`, min: `3`).\n\n###### `options.ruleSpaces`\n\nWhether to add spaces between markers in thematic breaks (`boolean`, default:\n`false`).\n\n###### `options.setext`\n\nWhether to use setext headings when possible (`boolean`, default: `false`).\nThe default is to always use ATX headings (`# heading`) instead of setext\nheadings (`heading\\n=======`).\nSetext headings cannot be used for empty headings or headings with a rank of\nthree or more.\n\n###### `options.strong`\n\nMarker to use for strong (`'*'` or `'_'`, default: `'*'`).\n\n###### `options.tightDefinitions`\n\nWhether to join definitions without a blank line (`boolean`, default: `false`).\n\nThe default is to add blank lines between any flow (“block”) construct.\nTurning this option on is a shortcut for a [`Join`][api-join] function like so:\n\n```js\nfunction joinTightDefinitions(left, right) {\n  if (left.type === 'definition' \u0026\u0026 right.type === 'definition') {\n    return 0\n  }\n}\n```\n\n###### `options.handlers`\n\nHandle particular nodes ([`Handlers`][api-handlers], optional).\n\n###### `options.join`\n\nHow to join blocks ([`Array\u003cJoin\u003e`][api-join], optional).\n\n###### `options.unsafe`\n\nSchemas that define when characters cannot occur\n([`Array\u003cUnsafe\u003e`][api-unsafe], optional).\n\n###### `options.extensions`\n\nList of extensions (`Array\u003cOptions\u003e`, default: `[]`).\nEach extension is an object with the same interface as `Options` itself.\n\n### `SafeConfig`\n\nConfiguration passed to `state.safe` (TypeScript type).\n\n###### Fields\n\n* `before` (`string`)\n  — characters before this (guaranteed to be one, can be more)\n* `after` (`string`)\n  — characters after this (guaranteed to be one, can be more)\n* `encode` (`Array\u003cstring\u003e`, optional)\n  — extra characters that *must* be encoded (as character references) instead\n  of escaped (character escapes).\n  Only ASCII punctuation will use character escapes, so you never need to\n  pass non-ASCII-punctuation here\n\n### `State`\n\nInfo passed around about the current state (TypeScript type).\n\n###### Fields\n\n* `stack` ([`Array\u003cConstructName\u003e`][api-construct-name])\n  — stack of constructs we’re in\n* `indexStack` (`Array\u003cnumber\u003e`)\n  — positions of child nodes in their parents\n* `associationId` (`(node: Association) =\u003e string`)\n  — get an identifier from an association to match it to others (see\n  [`Association`][github-mdast-association])\n* `enter` (`(construct: ConstructName) =\u003e () =\u003e undefined`)\n  — enter a construct (returns a corresponding exit function)\n  (see [`ConstructName`][api-construct-name])\n* `indentLines` (`(value: string, map: Map) =\u003e string`)\n  — pad serialized markdown (see [`Map`][api-map])\n* `compilePattern` (`(pattern: Unsafe) =\u003e RegExp`)\n  — compile an unsafe pattern to a regex (see [`Unsafe`][api-unsafe])\n* `containerFlow` (`(parent: Node, info: Info) =\u003e string`)\n  — serialize flow children (see [`Info`][api-info])\n* `containerPhrasing` (`(parent: Node, info: Info) =\u003e string`)\n  — serialize phrasing children (see [`Info`][api-info])\n* `createTracker` (`(info: Info) =\u003e Tracker`)\n  — track positional info in the output (see [`Info`][api-info],\n  [`Tracker`][api-tracker])\n* `safe` (`(value: string, config: SafeConfig) =\u003e string`)\n  — make a string safe for embedding (see [`SafeConfig`][api-safe-config])\n* `options` ([`Options`][api-options])\n  — applied user configuration\n* `unsafe` ([`Array\u003cUnsafe\u003e`][api-unsafe])\n  — applied unsafe patterns\n* `join` ([`Array\u003cJoin\u003e`][api-join])\n  — applied join handlers\n* `handle` ([`Handle`][api-handle])\n  — call the configured handler for the given node\n* `handlers` ([`Handlers`][api-handlers])\n  — applied handlers\n* `bulletCurrent` (`string` or `undefined`)\n  — list marker currently in use\n* `bulletLastUsed` (`string` or `undefined`)\n  — list marker previously in use\n\n### `Tracker`\n\nTrack positional info in the output (TypeScript type).\n\nThis info isn’t used yet but such functionality will allow line wrapping,\nsource maps, etc.\n\n###### Fields\n\n* `current` (`() =\u003e Info`)\n  — get current tracked info\n* `shift` (`(value: number) =\u003e undefined`)\n  — define a relative increased line shift (the typical indent for lines)\n* `move` (`(value: string) =\u003e string`)\n  — move past some generated markdown\n\n### `Unsafe`\n\nSchema that defines when a character cannot occur (TypeScript type).\n\n###### Fields\n\n* `character` (`string`)\n  — single unsafe character\n* `inConstruct` ([`Array\u003cConstructName\u003e`][api-construct-name],\n  `ConstructName`, optional)\n  — constructs where this is bad\n* `notInConstruct` ([`Array\u003cConstructName\u003e`][api-construct-name],\n  `ConstructName`, optional)\n  — constructs where this is fine again\n* `before` (`string`, optional)\n  — `character` is bad when this is before it (cannot be used together with\n  `atBreak`)\n* `after` (`string`, optional)\n  — `character` is bad when this is after it\n* `atBreak` (`boolean`, optional)\n  — `character` is bad at a break (cannot be used together with `before`)\n\n## List of extensions\n\n* [`syntax-tree/mdast-util-directive`][github-mdast-util-directive]\n  — directives\n* [`syntax-tree/mdast-util-frontmatter`][github-mdast-util-frontmatter]\n  — frontmatter (YAML, TOML, more)\n* [`syntax-tree/mdast-util-gfm`][github-mdast-util-gfm]\n  — GFM\n* [`syntax-tree/mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)\n  — GFM autolink literals\n* [`syntax-tree/mdast-util-gfm-footnote`](https://github.com/syntax-tree/mdast-util-gfm-footnote)\n  — GFM footnotes\n* [`syntax-tree/mdast-util-gfm-strikethrough`](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)\n  — GFM strikethrough\n* [`syntax-tree/mdast-util-gfm-table`](https://github.com/syntax-tree/mdast-util-gfm-table)\n  — GFM tables\n* [`syntax-tree/mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)\n  — GFM task list items\n* [`syntax-tree/mdast-util-math`][github-mdast-util-math]\n  — math\n* [`syntax-tree/mdast-util-mdx`][github-mdast-util-mdx]\n  — MDX\n* [`syntax-tree/mdast-util-mdx-expression`](https://github.com/syntax-tree/mdast-util-mdx-expression)\n  — MDX expressions\n* [`syntax-tree/mdast-util-mdx-jsx`](https://github.com/syntax-tree/mdast-util-mdx-jsx)\n  — MDX JSX\n* [`syntax-tree/mdast-util-mdxjs-esm`](https://github.com/syntax-tree/mdast-util-mdxjs-esm)\n  — MDX ESM\n\n## Syntax\n\nMarkdown is serialized according to CommonMark but care is taken to format in\nsuch a way that the resulting markdown should work with most markdown parsers.\nExtensions can add support for custom syntax.\n\n## Syntax tree\n\nThe syntax tree is [mdast][github-mdast].\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types\n[`ConstructName`][api-construct-name],\n[`ConstructNameMap`][api-construct-name-map],\n[`Handle`][api-handle],\n[`Handlers`][api-handlers],\n[`Info`][api-info],\n[`Join`][api-join],\n[`Map`][api-map],\n[`Options`][api-options],\n[`SafeConfig`][api-safe-config],\n[`State`][api-State], and\n[`Unsafe`][api-Unsafe].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `mdast-util-to-markdown@^2`,\ncompatible with Node.js 16.\n\n## Security\n\n`mdast-util-to-markdown` will do its best to serialize markdown to match the\nsyntax tree, but there are several cases where that is impossible.\nIt’ll do its best, but complete roundtripping is impossible given that any value\ncould be injected into the tree.\n\nAs markdown is sometimes used for HTML, and improper use of HTML can open you up\nto a [cross-site scripting (XSS)][wikipedia-xss] attack,\nuse of `mdast-util-to-markdown`\nand parsing it again later could potentially be unsafe.\nWhen parsing markdown afterwards and then going to HTML, use something like\n[`hast-util-sanitize`][github-hast-util-sanitize] to make the tree safe.\n\n## Related\n\n* [`syntax-tree/mdast-util-from-markdown`](https://github.com/syntax-tree/mdast-util-from-markdown)\n  — parse markdown to mdast\n* [`micromark/micromark`](https://github.com/micromark/micromark)\n  — parse markdown\n* [`remarkjs/remark`][github-remark]\n  — process markdown\n\n## Contribute\n\nSee [`contributing.md`][health-contributing] in\n[`syntax-tree/.github`][health] for\nways 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, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][wooorm]\n\n\u003c!-- Definitions --\u003e\n\n[api-construct-name]: #constructname\n\n[api-construct-name-map]: #constructnamemap\n\n[api-default-handlers]: #defaulthandlers\n\n[api-handle]: #handle\n\n[api-handlers]: #handlers\n\n[api-info]: #info\n\n[api-join]: #join\n\n[api-map]: #map\n\n[api-options]: #options\n\n[api-safe-config]: #safeconfig\n\n[api-state]: #state\n\n[api-to-markdown]: #tomarkdowntree-options\n\n[api-tracker]: #tracker\n\n[api-unsafe]: #unsafe\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[build]: https://github.com/syntax-tree/mdast-util-to-markdown/actions\n\n[build-badge]: https://github.com/syntax-tree/mdast-util-to-markdown/workflows/main/badge.svg\n\n[chat]: https://github.com/syntax-tree/unist/discussions\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[collective]: https://opencollective.com/unified\n\n[coverage]: https://codecov.io/github/syntax-tree/mdast-util-to-markdown\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-to-markdown.svg\n\n[downloads]: https://www.npmjs.com/package/mdast-util-to-markdown\n\n[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-to-markdown.svg\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[github-hast-util-sanitize]: https://github.com/syntax-tree/hast-util-sanitize\n\n[github-mdast]: https://github.com/syntax-tree/mdast\n\n[github-mdast-association]: https://github.com/syntax-tree/mdast#association\n\n[github-mdast-nodes]: https://github.com/syntax-tree/mdast#nodes\n\n[github-mdast-util-directive]: https://github.com/syntax-tree/mdast-util-directive\n\n[github-mdast-util-frontmatter]: https://github.com/syntax-tree/mdast-util-frontmatter\n\n[github-mdast-util-gfm]: https://github.com/syntax-tree/mdast-util-gfm\n\n[github-mdast-util-math]: https://github.com/syntax-tree/mdast-util-math\n\n[github-mdast-util-mdx]: https://github.com/syntax-tree/mdast-util-mdx\n\n[github-remark]: https://github.com/remarkjs/remark\n\n[github-remark-stringify]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify\n\n[github-unist-point]: https://github.com/syntax-tree/unist#point\n\n[health]: https://github.com/syntax-tree/.github\n\n[health-coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md\n\n[health-contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md\n\n[health-support]: https://github.com/syntax-tree/.github/blob/main/support.md\n\n[license]: license\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[size]: https://bundlejs.com/?q=mdast-util-to-markdown\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size\u0026query=$.size.compressedSize\u0026url=https://deno.bundlejs.com/?q=mdast-util-to-markdown\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[typescript]: https://www.typescriptlang.org\n\n[wikipedia-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[wooorm]: https://wooorm.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyntax-tree%2Fmdast-util-to-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyntax-tree%2Fmdast-util-to-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyntax-tree%2Fmdast-util-to-markdown/lists"}