@humanspeak/svelte-markdown
Version:
Markdown and HTML renderer for Svelte 5 — built for rendering streaming AI agent output from Claude Code, ChatGPT, and agentic workflows. XSS-safe defaults, streaming-aware sanitization, token caching, TypeScript types, and Svelte 5 runes.
25 lines (24 loc) • 840 B
JavaScript
/**
* Canonical key lists for markdown renderers and HTML tag renderers.
*
* These arrays and types drive the allow/deny filter utilities and serve as
* the single source of truth for which renderer and HTML tag names the
* library recognizes.
*
* @module
*/
import Html from '../renderers/html/index.js';
import { defaultRenderers } from './markdown-parser.js';
/**
* Canonical array of every markdown renderer key.
*
* Re-exported publicly as `rendererKeys`. Built at runtime from
* `defaultRenderers` (filtering out the special `html` key).
*/
export const rendererKeysInternal = Object.keys(defaultRenderers).filter((k) => k !== 'html');
/**
* Canonical array of every HTML tag name with a built-in renderer.
*
* Re-exported publicly as `htmlRendererKeys`.
*/
export const htmlRendererKeysInternal = Object.keys(Html);