mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
14 lines
303 B
TypeScript
14 lines
303 B
TypeScript
import { sanitize } from 'dompurify';
|
|
import { marked } from 'marked';
|
|
|
|
marked.setOptions({
|
|
renderer: new marked.Renderer(),
|
|
gfm: true,
|
|
breaks: false,
|
|
pedantic: false,
|
|
smartLists: true,
|
|
smartypants: false,
|
|
});
|
|
|
|
export const markdownToHTML = (input: string) => sanitize(marked.parse(input));
|