Skip to content

Commit d6cc782

Browse files
committed
fixup! Keep h1 and other headings
Signed-off-by: Kevin Decherf <[email protected]>
1 parent 6c21492 commit d6cc782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/Readability.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ public function prepArticle(\DOMNode $articleContent): void
405405
$this->clean($articleContent, 'h1');
406406
}
407407
$h2s = $articleContent->getElementsByTagName('h2');
408-
if (0 === $h1s && 1 === $h2s->length && mb_strlen($this->getInnerText($h2s->item(0), true, true)) < 100) {
408+
if (0 === $h1s->length && 1 === $h2s->length && mb_strlen($this->getInnerText($h2s->item(0), true, true)) < 100) {
409409
$this->clean($articleContent, 'h2');
410410
}
411411

0 commit comments

Comments
 (0)