From 02e043f6de62ad0cbdbb7dec5463f694e5373048 Mon Sep 17 00:00:00 2001 From: Jan Lukas Gernert Date: Thu, 2 Mar 2023 01:08:28 +0100 Subject: [PATCH] fix negative regex --- src/constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.rs b/src/constants.rs index 25c0a1c..9b79401 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -41,7 +41,7 @@ pub static POSITIVE: Lazy = .expect("POSITIVE regex") }); pub static NEGATIVE: Lazy = - Lazy::new(|| Regex::new(r#"-ad-|hidden|^hid$| hid$| hid |^hid"#).expect("NEGATIVE regex")); + Lazy::new(|| Regex::new(r#"-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget"#).expect("NEGATIVE regex")); pub static TITLE_SEPARATOR: Lazy = Lazy::new(|| Regex::new(r#"[-|\\/>ยป]"#).expect("TITLE_SEPARATOR regex"));