fix(app): accept tenor links with a regional locale prefix (#1966)

This commit is contained in:
Hampus
2026-08-24 12:54:39 +02:00
committed by GitHub
parent 099fb80da2
commit de97bf908d
@@ -20,7 +20,7 @@ export function extractTenorSlugId(url: string): string | null {
if (hostname !== 'tenor.com' && hostname !== 'www.tenor.com') {
return null;
}
const match = parsedUrl.pathname.match(/^\/(?:[a-z]{2}\/)?view\/([^/]+)/i);
const match = parsedUrl.pathname.match(/^\/(?:[a-z]{2}(?:-[a-z]{2})?\/)?view\/([^/]+)/i);
if (!match?.[1]) {
return null;
}