Showdown is an open-source JavaScript library designed for converting Markdown formatted text into HTML. It is a robust, cross-platform solution, capable of operating both client-side in web browsers and server-side within Node.js environments. The current stable version is 2.1.0, with releases occurring periodically to address bugs, update dependencies, and introduce features; for instance, version 2.0.0 primarily focused on maintenance, updating its `yargs` dependency and Node.js support. Key differentiators include its foundational basis on John Gruber's original Markdown specifications, long-standing stability, and an experimental HTML to Markdown converter introduced in version 1.9.0, providing versatile bidirectional conversion capabilities. Unlike some newer, more opinionated Markdown parsers, Showdown offers extensive configuration options to control the conversion process, allowing users to enable or disable various Markdown features.
npm install showdownVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Showdown converter with several common options (emoji, strikethrough, tables, tasklists) and convert a Markdown string into an HTML string using CommonJS syntax.
Update your CLI commands. For example, `showdown makehtml -i foo.md -o bar.html --strikethrough --emoji` becomes `showdown makehtml -i foo.md -o bar.html -c strikethrough -c emoji`.
Ensure your Node.js environment is running a version in the 'Current', 'Active', or 'Maintenance' phase (e.g., 12.x, 14.x, 16.x, 17.x at the time of the 2.0.0 release). Upgrade Node.js if necessary.
Review the new MIT license terms if your project's licensing or distribution depends on Showdown's license.
Test your CLI scripts and custom integrations thoroughly after upgrading to ensure no unexpected changes in argument parsing or behavior.
For new projects, ensure you are testing against contemporary browser versions. If targeting extremely old browsers, be prepared for potential edge cases or feature limitations.
In browsers, ensure you have included `<script src="path/to/showdown.min.js"></script>` before attempting to use it. In a module, ensure it's imported via `require` or `import`.
Always use `new showdown.Converter()` to create a new converter instance.
For CLI options like `strikethrough` or `emoji`, use the `-c` flag for each option. E.g., `showdown makehtml -i input.md -o output.html -c strikethrough -c emoji`.
Refactor your import statements to use ESM syntax: `import { Converter } from 'showdown';` and then `new Converter();`.No dependency data recorded yet.