{"library":"remarkable","title":"Remarkable Markdown Parser","description":"Remarkable is a fast, extensible Markdown parser for JavaScript, offering 100% CommonMark specification support, alongside syntax extensions and typographer features. Currently at version 2.0.1, the library provides a robust solution for converting Markdown strings to HTML. Its key differentiators include high performance, a highly configurable parsing engine that allows adding or replacing syntax rules, and a vibrant community plugin ecosystem available via npm. Version 2.0.0 introduced significant changes, including a migration to ES module source code, rollup-based bundling for UMD, CJS, and ESM formats, and a shift to named exports for its public API. The project maintains an active development status, with updates focusing on stability and modern JavaScript practices.","language":"javascript","status":"active","last_verified":"Tue Apr 21","install":{"commands":["npm install remarkable"],"cli":null},"imports":["import { Remarkable } from 'remarkable';","const { Remarkable } = require('remarkable');","const md = new Remarkable('commonmark');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { Remarkable } from 'remarkable';\n\n// Initialize Remarkable with default settings (similar to GFM, but HTML disabled)\nconst md = new Remarkable();\n\n// Render a basic Markdown string to HTML\nconst markdownString = '# Hello, Remarkable!\\n\\nThis is a *simple* paragraph.';\nconst htmlOutput = md.render(markdownString);\n\nconsole.log('--- Default Rendering ---');\nconsole.log(htmlOutput);\n// Expected output: <h1>Hello, Remarkable!</h1><p>This is a <em>simple</em> paragraph.</p>\n\n// Demonstrate a common preset: 'commonmark'\nconst mdCommonMark = new Remarkable('commonmark');\nconst commonMarkOutput = mdCommonMark.render('1. Ordered list item\\n\\n- Unordered list item');\n\nconsole.log('\\n--- CommonMark Preset Rendering ---');\nconsole.log(commonMarkOutput);\n\n// Demonstrate setting options via constructor\nconst mdWithOptions = new Remarkable({\n  html: true,         // Enable HTML tags in source\n  breaks: true,       // Convert '\\n' in paragraphs into <br>\n  typographer: true   // Enable smart quotes and other typographic improvements\n});\n\nconst complexMarkdown = `\n# Markdown with Options\n<p>This is an HTML paragraph.</p>\nLine one.\nLine two.\n\n\"Smart quotes\" should be enabled.\n`;\nconst complexHtmlOutput = mdWithOptions.render(complexMarkdown);\n\nconsole.log('\\n--- Rendering with Custom Options ---');\nconsole.log(complexHtmlOutput);","lang":"typescript","description":"Demonstrates basic usage of the Remarkable parser, including default rendering, applying the 'commonmark' preset, and configuring options via the constructor to enable features like HTML tags, line breaks, and typographer rules.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}