Skip to content

Commit 9894b56

Browse files
committed
fix(shared): treat ftp links as external (close vuepress#456)
1 parent b8f35c9 commit 9894b56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/@vuepress/shared/src/utils/isLinkExternal.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { isLinkFtp } from './isLinkFtp'
12
import { isLinkHttp } from './isLinkHttp'
23

34
/**
45
* Determine a link is external or not
56
*/
67
export const isLinkExternal = (link: string, base = '/'): boolean => {
7-
// http link
8-
if (isLinkHttp(link)) {
8+
// http link or ftp link
9+
if (isLinkHttp(link) || isLinkFtp(link)) {
910
return true
1011
}
1112

0 commit comments

Comments
 (0)