Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

marked-xhtml

markedjs6.6kMIT1.0.12TypeScript support: included

marked xhtml

marked, extension, xhtml

readme

marked-xhtml

Add closing slash to tags like: hr, br, img, and input

Usage

import { marked } from "marked";
import { markedXhtml } from "marked-xhtml";

// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/marked-xhtml/lib/index.umd.js"></script>

marked.use(markedXhtml());

marked.parse("---");
// <hr/>