streamdown-render

Crates.iostreamdown-render
lib.rsstreamdown-render
version0.1.3
created_at2025-12-31 20:44:22.173155+00
updated_at2025-12-31 21:05:03.896039+00
descriptionTerminal rendering engine for streamdown
homepage
repositoryhttps://github.com/fed-stew/streamdown-rs
max_upload_size
id2015343
size110,493
(janfeddersen-wq)

documentation

README

streamdown-render

Terminal rendering engine for the streamdown streaming markdown renderer.

Overview

The core rendering engine that transforms parsed markdown into beautiful terminal output:

  • Box drawing - Unicode borders for code blocks and tables
  • Syntax highlighting - Integrated code highlighting
  • Responsive layout - Adapts to terminal width
  • Streaming output - Renders incrementally as content arrives
  • Clipboard integration - OSC 52 support for code blocks

Usage

[dependencies]
streamdown-render = "0.1"
use streamdown_parser::Parser;
use streamdown_render::Renderer;

let mut output = Vec::new();
let mut parser = Parser::new();

{
    let mut renderer = Renderer::new(&mut output, 80);

    for line in markdown.lines() {
        for event in parser.parse_line(line) {
            renderer.render_event(&event)?;
        }
    }
}

print!("{}", String::from_utf8(output)?);

Features

  • Beautiful headings with proper centering
  • Syntax-highlighted code blocks with borders
  • Unicode box-drawing tables
  • Nested list rendering with bullets
  • Blockquote styling
  • Think block rendering for LLM output

Part of Streamdown

This is a component of streamdown-rs, a streaming markdown renderer for modern terminals.

License

MIT

Commit count: 0

cargo fmt