From 90d3063f93d0998cc39ddaff8740ddb1bcd87b23 Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Wed, 3 Feb 2021 21:42:43 -0800 Subject: [PATCH] Fix #96 --- src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 261af35..f834055 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -173,7 +173,7 @@ pub fn format_url(url: &str) -> String { // Rewrite Reddit links to Libreddit in body of text pub fn rewrite_url(text: &str) -> String { - let re = Regex::new(r#"href="(https://|http://|)(www.|)(reddit).(com)/"#).unwrap(); + let re = Regex::new(r#"href="(https://|http://|)(www.|old.|np.|)(reddit).(com)/"#).unwrap(); re.replace_all(text, r#"href="/"#).to_string() }