mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Remove br from paragraphs only
This commit is contained in:
parent
76b199ff45
commit
8836c85a34
1 changed files with 3 additions and 2 deletions
|
@ -1115,8 +1115,9 @@ public class HtmlHelper {
|
|||
// Breaks
|
||||
for (Element br : document.select("br")) {
|
||||
Element parent = br.parent();
|
||||
Element last = (parent == null ? null : parent.lastElementChild());
|
||||
if (br == last)
|
||||
if (parent == null || !"p".equals(parent.tagName()))
|
||||
continue;
|
||||
if (br == parent.lastElementChild())
|
||||
br.remove();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue