mirror of
https://github.com/directus/directus.git
synced 2026-01-29 16:28:02 -05:00
10 lines
204 B
TypeScript
10 lines
204 B
TypeScript
import { marked } from 'marked';
|
|
import sanitizeHTML from 'sanitize-html';
|
|
|
|
/**
|
|
* Render and sanitize a markdown string
|
|
*/
|
|
export function md(str: string): string {
|
|
return sanitizeHTML(marked(str));
|
|
}
|