mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Fix link detection
This commit is contained in:
parent
456d4f4ae8
commit
d55bd95c72
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
export default function isMastodonLinkMaybe(url) {
|
||||
const { pathname } = new URL(url);
|
||||
return (
|
||||
/^https:\/\/.*\/\d+$/i.test(url) ||
|
||||
/^https:\/\/.*\/notes\/[a-z0-9]+$/i.test(url) // Misskey, Calckey
|
||||
/^\/.*\/\d+$/i.test(pathname) || /^\/notes\/[a-z0-9]+$/i.test(pathname) // Misskey, Calckey
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue