From ccbaa64f192c5e399b12a11204b0d6f9f2e25fd2 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 20 Mar 2026 05:09:39 +0200 Subject: [PATCH] keep leading `\s+url` to skip the `thumbnail_url` match --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d666bc4..47e4f1f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -260,7 +260,8 @@ fn main() -> Result<()> { } fn pre_format(data: &str, uploads: &mut HashSet) -> String { - const R: &str = r#"(?s)]*>[^<]*"#; + // * keep leading `\s+url` to skip the `thumbnail_url` match + const R: &str = r#"(?s)]*>[^<]*"#; html_escape::decode_html_entities(&strip_tags::strip_tags( &Regex::new(R).unwrap().replace_all(data, |c: &Captures| { let rel = c[2].trim_start_matches("/").trim_start_matches("d/");