MCPcopy Create free account
hub / github.com/algolia/docsearch / parseMarkdownToSafeHtml

Function parseMarkdownToSafeHtml

packages/docsearch-react/src/utils/markdown.ts:50–56  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

48
49/** Parses markdown into HTML safe for `dangerouslySetInnerHTML`. */
50export function parseMarkdownToSafeHtml(content: string): string {
51 return marked.parse(content, {
52 gfm: true,
53 breaks: true,
54 renderer,
55 }) as string;
56}

Callers 2

markdown.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected