mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): accept tenor links with a regional locale prefix (#1966)
This commit is contained in:
1 parent
099fb80da2
commit
de97bf908d
1 file changed
+1
-1
@@ -20,7 +20,7 @@ export function extractTenorSlugId(url: string): string | null {
|
|||||||
if (hostname !== 'tenor.com' && hostname !== 'www.tenor.com') {
|
if (hostname !== 'tenor.com' && hostname !== 'www.tenor.com') {
|
||||||
return null;
|
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]) {
|
if (!match?.[1]) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user