{"library":"micromark","title":"micromark Markdown Parser","description":"micromark is a small, CommonMark-compliant markdown parser implemented in JavaScript as a state machine. It is designed to be highly performant and robust, emitting concrete tokens with positional information, which are then compiled directly to HTML. The current stable version is 4.0.2, released as part of an actively maintained monorepo. It maintains a consistent release cadence, with minor updates and patches addressing performance improvements and bug fixes, as seen in recent 4.0.x releases. A key differentiator is its strict adherence to CommonMark and GFM specifications, further validated by thousands of additional tests that align with reference parser behavior. It also supports popular extensions such as MDX, math, and frontmatter, and is built with security in mind, being safe by default. Its design allows for both straightforward markdown-to-HTML conversion and highly complex markdown processing workflows, making it a foundational tool in the `unified` ecosystem.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install micromark"],"cli":null},"imports":["import { micromark } from 'micromark'","import { gfm } from 'micromark-extension-gfm'","import { gfmHtml } from 'micromark-extension-gfm'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { micromark } from 'micromark'\nimport { gfmHtml, gfm } from 'micromark-extension-gfm'\n\nconst markdownValue = '* [x] contact@example.com ~~strikethrough~~\\n\\n# Hello World\\n\\nThis is a paragraph with some **bold** text.'\n\nconst result = micromark(markdownValue, {\n  extensions: [gfm()],\n  htmlExtensions: [gfmHtml()]\n})\n\nconsole.log(result)\n\n/*\nYields:\n<ul>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> <a href=\"mailto:contact@example.com\">contact@example.com</a> <del>strikethrough</del></li>\n</ul>\n<h1>Hello World</h1>\n<p>This is a paragraph with some <strong>bold</strong> text.</p>\n*/","lang":"typescript","description":"This example demonstrates parsing a markdown string, including GitHub Flavored Markdown (GFM) extensions like task lists, autolinks, and strikethrough, and outputting the corresponding HTML. It shows how to integrate optional extensions.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}