diff --git a/src/decoders/html.rs b/src/decoders/html.rs index f1b9f480..579d74e8 100644 --- a/src/decoders/html.rs +++ b/src/decoders/html.rs @@ -78,7 +78,8 @@ pub fn html_to_text(input: &str) -> String { match input.get(token_start..token_end + 1) { Some(tag) if tag.eq_ignore_ascii_case(b"br") - || (tag.eq_ignore_ascii_case(b"p") && is_tag_close) => + || (tag.eq_ignore_ascii_case(b"p") && is_tag_close) + || (tag.eq_ignore_ascii_case(b"div") && is_tag_close) => { result.push('\n'); is_after_space = false; @@ -2390,6 +2391,13 @@ mod tests { "
please unsubscribe here.
", "please unsubscribe here.\n", ), + ( + concat!( + "