Macro stylish_html::format
source · macro_rules! format { ($($arg:tt)*) => { ... }; }
Available on crate features
alloc
and macros
only.Expand description
Create a String
with inline ANSI escape codes styling its formatted
data.
assert_eq!(
stylish::html::format!("Hello {:(fg=red)}", "Ferris"),
"Hello <span style=color:red>Ferris</span>",
);