Function anstyle_roff::to_roff
source · pub fn to_roff(styled_text: &str) -> Roff
Expand description
Generate a Roff
from ANSI escape codes
let text = "\u{1b}[44;31mtest\u{1b}[0m";
let roff_doc = anstyle_roff::to_roff(text);
let expected = r#".gcolor red
.fcolor blue
test
"#;
assert_eq!(roff_doc.to_roff(), expected);