1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-08 16:40:00 +02:00

fix negative regex & fmt

This commit is contained in:
Jan Lukas Gernert 2023-03-12 11:42:37 +01:00
parent 1e71aa2bfb
commit 58a799b096
2 changed files with 4 additions and 2 deletions

View file

@ -355,7 +355,9 @@ impl Readability {
// The scores shouldn't get too low.
let score_threshold = last_score / 3.0;
while parent_of_top_candidate.is_some() && !Util::has_tag_name(parent_of_top_candidate.as_ref(), "BODY") {
while parent_of_top_candidate.is_some()
&& !Util::has_tag_name(parent_of_top_candidate.as_ref(), "BODY")
{
if parent_of_top_candidate
.as_ref()
.map(|n| Self::get_content_score(n).is_none())