fix(v2): classify link hrefs with protocol identifier as internal (#3063)

This commit is contained in:
Frida Hjelm 2020-07-15 19:05:33 +02:00 committed by GitHub
parent 7660005db8
commit 5d08ef8ef1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,5 +6,5 @@
*/
export default function isInternalUrl(url: string): boolean {
return /^(https?:|\/\/|mailto:|tel:)/.test(url) === false;
return /^(\w*:|\/\/)/.test(url) === false;
}