diff --git a/src/utils.rs b/src/utils.rs index 4f08787..a9479c0 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -872,7 +872,7 @@ pub fn format_url(url: &str) -> String { } static REDDIT_REGEX: Lazy = Lazy::new(|| Regex::new(r#"href="(https|http|)://(www\.|old\.|np\.|amp\.|new\.|)(reddit\.com|redd\.it)/"#).unwrap()); -static REDDIT_PREVIEW_REGEX: Lazy = Lazy::new(|| Regex::new(r"https?://external-preview\.redd\.it(.*)[^?]").unwrap()); +static REDDIT_PREVIEW_REGEX: Lazy = Lazy::new(|| Regex::new(r"https?://(external-preview|preview)\.redd\.it(.*)[^?]").unwrap()); // Rewrite Reddit links to Redlib in body of text pub fn rewrite_urls(input_text: &str) -> String {