3 releases
| 0.1.4 | Jan 26, 2026 |
|---|---|
| 0.1.3 | Dec 31, 2025 |
| 0.1.2 | Dec 31, 2025 |
| 0.1.1 |
|
| 0.1.0 |
|
#1168 in Text processing
418 downloads per month
Used in 4 crates
160KB
3K
SLoC
streamdown-parser
Streaming markdown parser for the streamdown terminal renderer.
Overview
A line-oriented streaming markdown parser designed for real-time rendering:
- Streaming design - Parses line-by-line as content arrives
- LLM-friendly - Handles partial/incomplete markdown gracefully
- Full CommonMark support - Headings, code blocks, lists, tables, etc.
- Think blocks - Special
<think>tag support for LLM output
Usage
[dependencies]
streamdown-parser = "0.1"
use streamdown_parser::Parser;
let mut parser = Parser::new();
for line in markdown.lines() {
for event in parser.parse_line(line) {
// Handle parsing events
match event {
Event::Heading { level, text } => { /* ... */ }
Event::CodeBlock { language, code } => { /* ... */ }
// ...
}
}
}
Features
- Headings (ATX style)
- Fenced code blocks with language detection
- Ordered and unordered lists (nested)
- Tables with alignment
- Blockquotes
- Inline formatting (bold, italic, code, links)
- Think blocks for LLM reasoning
Part of Streamdown
This is a component of streamdown-rs, a streaming markdown renderer for modern terminals.
License
MIT
Dependencies
~7–21MB
~280K SLoC