1use html2text::from_read;
2
3pub fn html2text(html: Vec<u8>) -> Vec<u8> {
4 html2text_with_width(html, 80)
5}
6
7pub fn html2text_with_width(html: Vec<u8>, width: u16) -> Vec<u8> {
8 from_read(html.as_slice(), width.into())
9 .unwrap()
10 .as_bytes()
11 .to_vec()
12}