Crate colored_markup

Source
Expand description

colored_markup is a library for rendering HTML-like markup with ANSI escape codes using CSS-like stylesheets.

 use colored_markup::{println_markup, StyleSheet};

 fn main() {
     let style_sheet =
         StyleSheet::parse("red { foreground: bright-red; styles: underline }").unwrap();
     println_markup!(&style_sheet, "The next word is <red>{}</red>", "red");
 }

Re-exports§

pub use stylesheet::*;

Modules§

styles
stylesheet

Macros§

eprintln_markup
A macro to print a string to stderr with markup.
format_markup
A macro to format a string with markup.
println_markup
A macro to print a string with markup.

Traits§

Styled
A trait for rendering markup.