mirror of
https://github.com/tabler/tabler.git
synced 2026-08-07 03:42:27 +04:00
575d68572f
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
15 lines
443 B
TypeScript
15 lines
443 B
TypeScript
// Renders markdown to HTML with markdown-it (html: true, indented code blocks off).
|
|
|
|
// @ts-ignore -- markdown-it ships no type declarations and @types/markdown-it
|
|
// is intentionally not added (build-time helper only).
|
|
import MarkdownIt from 'markdown-it'
|
|
|
|
const md = new MarkdownIt({ html: true })
|
|
|
|
md.disable('code')
|
|
|
|
/** Render a markdown string to HTML. */
|
|
export function renderMarkdown(src: string): string {
|
|
return md.render(src)
|
|
}
|