From d08eeed89726572f7ea341df59864cc72716751c Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:46:24 +0530 Subject: [PATCH] fix(theme): external link icon not visible for target _blank links closes #3327 --- src/client/theme-default/components/VPLink.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/theme-default/components/VPLink.vue b/src/client/theme-default/components/VPLink.vue index a10ee04a..f57e3328 100644 --- a/src/client/theme-default/components/VPLink.vue +++ b/src/client/theme-default/components/VPLink.vue @@ -12,7 +12,11 @@ const props = defineProps<{ }>() const tag = computed(() => props.tag ?? (props.href ? 'a' : 'span')) -const isExternal = computed(() => props.href && EXTERNAL_URL_RE.test(props.href)) +const isExternal = computed( + () => + (props.href && EXTERNAL_URL_RE.test(props.href)) || + props.target === '_blank' +)