markdown.renderer.streaming

index ยท markdown.renderer

Overview

Streaming terminal renderer that outputs text immediately as parser events arrive. Uses cursor-based re-rendering for code blocks. Requires a terminal with cursor movement support.

List looseness is applied from the point the parser reports it. Blocks already written cannot be respaced, so a list whose first blank line appears late keeps its earlier items tight. Feeding events through markdown.tightness first trades that for buffering the whole list.

Functions

NameSignature
newnew(options) -> renderer

new(options) -> renderer

Create a new streaming renderer instance

Returns a renderer with render_event(event), finish(), and reset() methods. Options: