diff --git a/src/constants.rs b/src/constants.rs index 9b79401..cc188fd 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -40,8 +40,9 @@ pub static POSITIVE: Lazy = ).case_insensitive(true).build() .expect("POSITIVE regex") }); -pub static NEGATIVE: Lazy = - 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 NEGATIVE: Lazy = 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"));