fix(youtube): remove non-shorts regex

This commit is contained in:
Kristofers Solo 2025-10-21 08:50:54 +03:00
parent a83dff719f
commit 2d4a409b84
Signed by: kristoferssolo
GPG Key ID: 74FF8144483D82C8

View File

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