fix(youtube): remove non-shorts regex

This reverts commit 2d4a409b84.
This commit is contained in:
Kristofers Solo 2025-10-21 16:29:08 +03:00
parent 4260bb5271
commit 6a50806fa5
Signed by: kristoferssolo
GPG Key ID: 8687F2D3EEE6F0ED

View File

@ -13,7 +13,7 @@ static SHORTCODE_RE: OnceLock<Regex> = OnceLock::new();
fn shortcode_regex() -> &'static Regex { fn shortcode_regex() -> &'static Regex {
SHORTCODE_RE.get_or_init(|| { SHORTCODE_RE.get_or_init(|| {
Regex::new(r"https?://(?:www\.)?(?:youtube\.com/shorts/[A-Za-z0-9_-]+(?:\?[^\s]*)?") Regex::new(r"https?:\/\/(?:www\.)?youtube\.com\/shorts\/[A-Za-z0-9_-]+(?:\?[^\s]*)?")
.expect("filed to compile regex") .expect("filed to compile regex")
}) })
} }