Check for elements in sections before header
Signed-off-by: Evan Lloyd New-Schmidt <evan@new-schmidt.com>
This commit is contained in:
parent
cd03fed762
commit
578f8a319d
1 changed files with 2 additions and 1 deletions
|
@ -340,7 +340,8 @@ fn remove_empty_sections(document: &mut Html) {
|
|||
}
|
||||
|
||||
if el
|
||||
.next_siblings()
|
||||
.prev_siblings()
|
||||
.chain(el.next_siblings())
|
||||
.filter_map(ElementRef::wrap)
|
||||
.all(|e| is_empty_or_whitespace(&e) || HEADERS.matches(&e))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue