mail-parser
mail-parser copied to clipboard
Break line when encountering ``<div>`` tag
<div> is block-level element by default, let it behaves like a <p> element.
BTW, A block-level element always starts on a new line and ends on a new line, so the condition would be better to change from:
tag.eq_ignore_ascii_case(b"p") && is_tag_close
to:
tag.eq_ignore_ascii_case(b"p")
I’m not sure if there was any special consideration for doing this before, so I kept the condition unchanged in this PR.