1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use String;
use Arguments;
use crateHtml;
/// Create a [`String`] with inline ANSI escape codes styling its formatted
/// data.
///
/// ```rust
/// assert_eq!(
/// stylish::html::format!("Hello {:(fg=red)}", "Ferris"),
/// "Hello <span style=color:red>Ferris</span>",
/// );
/// ```
/// Render the given attributed [`Arguments`] into a [`String`] by converting
/// the attributes into HTML elements.
///
/// ```rust
/// assert_eq!(
/// stylish::html::format(stylish::format_args!(
/// "Hello {:(fg=red)}",
/// "Ferris"
/// )),
/// "Hello <span style=color:red>Ferris</span>",
/// );
/// ```