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§
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.