Fix failing checks
This commit is contained in:
parent
4e2648280d
commit
4f0b29f930
@ -894,14 +894,14 @@ pub fn rewrite_urls(input_text: &str) -> String {
|
|||||||
// Rewrite external media previews to Redlib
|
// Rewrite external media previews to Redlib
|
||||||
if REDDIT_PREVIEW_REGEX.is_match(&text1) {
|
if REDDIT_PREVIEW_REGEX.is_match(&text1) {
|
||||||
loop {
|
loop {
|
||||||
if REDDIT_PREVIEW_REGEX.find(&text1) == None {
|
if REDDIT_PREVIEW_REGEX.find(&text1).is_none() {
|
||||||
return text1;
|
return text1;
|
||||||
} else {
|
} else {
|
||||||
text1 = REDDIT_PREVIEW_REGEX
|
text1 = REDDIT_PREVIEW_REGEX
|
||||||
.replace(&text1, format_url(REDDIT_PREVIEW_REGEX.find(&text1).map(|x| x.as_str()).unwrap_or_default()))
|
.replace(&text1, format_url(REDDIT_PREVIEW_REGEX.find(&text1).map(|x| x.as_str()).unwrap_or_default()))
|
||||||
.to_string()
|
.to_string()
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
} else {
|
} else {
|
||||||
text1
|
text1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user