insomnia/packages/insomnia-app/app/common/markdown-to-html.ts
Dimitri Mitropoulos 5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00

18 lines
351 B
TypeScript

import marked from 'marked';
marked.setOptions({
renderer: new marked.Renderer(),
gfm: true,
// @ts-expect-error -- TSCONVERSION missing from marked types
tables: true,
breaks: false,
pedantic: false,
sanitize: true,
smartLists: true,
smartypants: false,
});
export function markdownToHTML(markdown) {
return marked(markdown);
}