[][src]Function mdcat::push_tty

pub fn push_tty<'a, 'e, W, I>(
    settings: &Settings,
    writer: &'a mut W,
    base_dir: &'a Path,
    events: I
) -> Result<(), Box<dyn Error>> where
    I: Iterator<Item = Event<'e>>,
    W: Write

Write markdown to a TTY.

Iterate over Markdown AST events, format each event for TTY output and write the result to a writer, using the given settings for rendering and resource access. base_dir denotes the base directory the events were read from, to resolve relative references in the Markdown document.

push_tty tries to limit output to the given number of TTY columns but does not guarantee that output stays within the column limit.