Skip to content

Commit

Permalink
Fix failing checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ButteredCats committed Mar 30, 2024
1 parent 4e26482 commit 4f0b29f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,14 +894,14 @@ pub fn rewrite_urls(input_text: &str) -> String {
// Rewrite external media previews to Redlib
if REDDIT_PREVIEW_REGEX.is_match(&text1) {
loop {
if REDDIT_PREVIEW_REGEX.find(&text1) == None {
if REDDIT_PREVIEW_REGEX.find(&text1).is_none() {
return text1;
} else {
text1 = REDDIT_PREVIEW_REGEX
.replace(&text1, format_url(REDDIT_PREVIEW_REGEX.find(&text1).map(|x| x.as_str()).unwrap_or_default()))
.to_string()
.replace(&text1, format_url(REDDIT_PREVIEW_REGEX.find(&text1).map(|x| x.as_str()).unwrap_or_default()))
.to_string()
}
};
}
} else {
text1
}
Expand Down

0 comments on commit 4f0b29f

Please sign in to comment.