markdown-it is a fast, pluggable markdown parser that outputs raw HTML strings. @humanspeak/svelte-markdown wraps the marked parser in a native Svelte component with renderers, caching, and HTML control.
| Feature | @humanspeak/svelte-markdown | markdown-it |
|---|---|---|
| Svelte 5 Native | ||
| TypeScript Support | @types/markdown-it | |
| Component Output | Svelte components | Raw HTML string |
| Custom Renderers | Svelte components | Token stream manipulation |
| Token Caching | ||
| HTML Safety | Allow/deny per tag | Manual (use with {@html}) |
| Plugin Ecosystem | Via marked extensions | 200+ plugins |
| CommonMark Compliance | Via marked (GFM) | 100% CommonMark + extensions |
| XSS Protection | Built-in tag control | Manual sanitization required |
| Framework Integration | Native Svelte component | Framework-agnostic (requires {@html}) |
Choose markdown-it when you need a framework-agnostic parser with maximum CommonMark compliance and a vast plugin ecosystem. Choose @humanspeak/svelte-markdown when you want a native Svelte experience with component-based rendering, built-in safety controls, and caching.
Install in seconds and render your first markdown.