{"library":"markdown-it-sub","title":"markdown-it Subscript Plugin","description":"markdown-it-sub is a specialized plugin designed for the popular markdown-it parser, extending its capabilities to render subscript `<sub>` HTML tags from specific Markdown syntax. It adopts a Pandoc-like markup convention, where content enclosed in tildes (e.g., `H~2~O`) is parsed and converted into a subscript element. The current stable version is 2.0.0. While an explicit release cadence is not provided, markdown-it plugins typically maintain long-term stability and are updated primarily in response to breaking changes within the core markdown-it library or critical bug fixes. Its primary differentiator is its focused functionality on subscript rendering, offering a lightweight and standards-compliant method for incorporating mathematical or chemical notations without the complexity of full-fledged LaTeX-like rendering engines. It integrates seamlessly into existing markdown-it setups, enhancing parsing capabilities with minimal overhead. The plugin does not currently support nested subscript markup.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install markdown-it-sub"],"cli":null},"imports":["import markdownitSub from 'markdown-it-sub';","const markdownitSub = require('markdown-it-sub');","// Include <script src=\"path/to/markdown-it-sub.min.js\"></script>"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import MarkdownIt from 'markdown-it';\nimport markdownitSub from 'markdown-it-sub';\n\nconst md = MarkdownIt().use(markdownitSub);\n\nconst markdownInput = 'H~2~O is the chemical formula for water, and E=mc~2~ is Einstein\\'s famous equation.';\nconst htmlOutput = md.render(markdownInput);\n\nconsole.log(htmlOutput);\n// Expected output: <p>H<sub>2</sub>O is the chemical formula for water, and E=mc<sub>2</sub> is Einstein's famous equation.</p>","lang":"typescript","description":"Demonstrates initializing `markdown-it` and registering the subscript plugin, then rendering a Markdown string with subscript notation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}