Convert Markdown to HTML or strip Markdown syntax. Parse headings, bold, links, lists, and more.
import { markdown } from 'toolmetry';| Function | Parameters | Returns | Description |
|---|---|---|---|
markdown.toHtml | input: string | string | Convert Markdown to HTML |
markdown.strip | input: string | string | Strip Markdown syntax to plain text |
import { markdown } from 'toolmetry';
const html = markdown.toHtml('# Hello **World**');
// "<h1>Hello <strong>World</strong></h1>"import { markdown } from 'toolmetry';
const plain = markdown.strip('# Hello **World**');
// "Hello World"