A tool for converting reddit flavoured markdown text into HTML.
// import the .js file
import { parseMarkdown } from "./bundled/markdown-for-reddit.js";
// parse the markdown
const markdown = "# Hello __World__";
const html = parseMarkdown(markdown); // <h1>Hello <strong>World</strong></h1>
// put it into an element
document.body.innerHTML = html;Generates the markdown-for-reddit.js file and puts it into the ./bundled folder.
npm install
npm run bundleThis will automatically recompile the .ts files to .js files.
npm run watch