From e2a7ad51d2f669a26ef1e7d004520b9bc66ac090 Mon Sep 17 00:00:00 2001 From: Christoph Seitz Date: Sun, 17 Mar 2019 21:37:37 +0100 Subject: [PATCH] Update isExternal regex to comply with rfc3986 Updates the regex to use the scheme specification from rfc3986. This allows the user to use urls like `spotify:` or `vscode:` for special application usage. --- packages/@vuepress/theme-default/util/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vuepress/theme-default/util/index.js b/packages/@vuepress/theme-default/util/index.js index 9913ff7ea4..bff491560f 100644 --- a/packages/@vuepress/theme-default/util/index.js +++ b/packages/@vuepress/theme-default/util/index.js @@ -1,7 +1,7 @@ export const hashRE = /#.*$/ export const extRE = /\.(md|html)$/ export const endingSlashRE = /\/$/ -export const outboundRE = /^(https?:|mailto:|tel:)/ +export const outboundRE = /^([a-zA-Z][a-zA-Z0-9\-\+\.]*:)/ export function normalize (path) { return decodeURI(path)