Skip to main content

push_tty

Function push_tty 

Source
pub fn push_tty<'a, 'e, W, I>(
    settings: &Settings<'_>,
    environment: &Environment,
    resource_handler: &dyn ResourceUrlHandler,
    writer: &'a mut W,
    events: I,
) -> RenderResult<()>
where I: Iterator<Item = Event<'e>>, W: Write,
Expand description

Write markdown to a TTY.

Iterate over the Markdown AST events, format each one, and send the result to writer using settings and environment to drive styling and resource access.

push_tty tries to limit output to the configured terminal columns, but does not guarantee staying within the column limit (long words, images, and inline code can overflow).

Delegates to push_tty_with_observer with a NoopObserver. Callers that need structural information about the rendered output — heading positions, link ranges, and so on — should use that variant directly.