From 89140c8cf73659de9c43f060d463bfa11c953b6b Mon Sep 17 00:00:00 2001 From: Butter Cat Date: Sun, 7 Apr 2024 19:59:54 -0400 Subject: [PATCH] Actually fix checks this time --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index ddae2c9..63e679d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -895,14 +895,14 @@ pub fn rewrite_urls(input_text: &str) -> String { // Rewrite external media previews to Redlib loop { - if REDDIT_PREVIEW_REGEX.find(&text1).is_none() { + if REDDIT_PREVIEW_REGEX.find(&text1).is_none() { return text1; } else { let formatted_url = format_url(REDDIT_PREVIEW_REGEX.find(&text1).map(|x| x.as_str()).unwrap_or_default()); let image_url = REDLIB_PREVIEW_LINK_REGEX.find(&formatted_url).map_or("", |m| m.as_str()).to_string(); let image_text = REDLIB_PREVIEW_TEXT_REGEX.find(&formatted_url).map_or("", |m| m.as_str()).to_string(); - + let image_to_replace = format!(">", ">"); let image_replacement = format!("");