[go: up one dir, main page]

termimad 0.2.0

Terminal Renderer for markdown snippets
Documentation

MIT Latest Version docs Chat on Miaou

A simple tool to display static or dynamic Markdown snippets in the terminal, with skin isolation.

Based on crossterm so works on most terminals (even on windows).

text

Usage

[dependencies]
termimad = "0.2"

With the default skin:

termimad::print_line("**some** *nested **style*** and `some(code)`");

or

print!("{}", termimad.line("**some** *nested **style*** and `some(code)`"));

Result:

simple example

With a custom skin:

let mut skin = MadSkin::new();
skin.bold = skin.bold.fg(Yellow);
skin.print_line_ln("*Hey* **World!** Here's `some(code)`");
mad_colors!(skin.normal, Magenta, Rgb{r:30, g:30, b:40});
skin.italic.add_attr(Underlined);
println!("and now {}", skin.line("a little *too much* **style!** (and `some(code)` too)"));

Result:

too much style