commit 49be4908ba9bbe63d2ddfa7d3690687e9bef8e94
parent 9ed16fa5691de5cc7acc4332f5a47d136e88109a
Author: alex wennerberg <alex@alexwennerberg.com>
Date: Thu, 6 Jan 2022 10:13:41 -0800
I think this is a bug fix
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
@@ -1,9 +1,6 @@
// almost a line for line rewrite of https://github.com/k3a/html2text/blob/master/html2text.go
//
mod entity;
-fn main() {
- println!("Hello, world!");
-}
const LBR: &str = "\r\n";
// stolen from https://github.com/veddan/rust-htmlescape/blob/master/src/decode.rs
@@ -209,6 +206,7 @@ pub fn html2text(html: &str) -> String {
if let Some(link) = parse_link(tag) {
if !link.contains("javascript:") {
out_buf.push_str(&html_entitities_to_text(link));
+ can_print_new_line = true;
}
}
} else if tag_name_lower.len() > 0