Overview of vue-stream-markdown
mainvue-stream-markdown is a Markdown renderer specifically optimized for streaming scenarios (such as LLM responses). It uses the Comark incremental parser to handle incomplete Markdown nodes, providing loading states for images, tables, and code blocks to prevent visual jitter during the streaming process.
Key Capabilities
- Streaming Optimization: Smoothly handles incomplete syntax with visual loading states.
- Extensible Rendering: Supports syntax highlighting (via
@stream-markdown/code), diagramming (Mermaid/Beautiful Mermaid), and mathematical typesetting (KaTeX). - Customization: Allows mapping custom tags directly to Vue components and replacing any built-in UI elements.
- Security: Includes built-in content hardening, URL validation, and protocol blocking to protect against malicious Markdown.
- Styling: Uses scoped styles under
.stream-markdownwith semanticdata-stream-markdownattributes, following a design system inspired by Shadcn UI. It is self-contained and does not require Tailwind CSS or UnoCSS.