fix: incorrect link replacements

This commit is contained in:
Xylight committed 2024-06-08 14:36:47 -07:00
1 parent d5350ef59a
commit f5b380f005
1 file changed
+2 -1
+2 -1
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { page } from '$app/stores'
import { env } from '$env/dynamic/public'
import { md, mdInline, photonify } from '$lib/components/markdown/markdown'
import { onMount } from 'svelte'
@@ -17,7 +18,7 @@
const photonified = photonify(l.href)
if (photonified) l.href = photonified
else {
else if (!l.href.startsWith($page.url.origin)) {
l.target = '_blank'
l.rel = 'noopener noreferrer'
}