feat: switch to svelte-markdown
This commit is contained in:
1 parent
2b642b0926
commit
98a899c596
27 files changed
+510
-139
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<script lang="ts">
|
||||
import { photonify } from './plugins'
|
||||
|
||||
export let href = ''
|
||||
export let title = undefined
|
||||
|
||||
export const parseURL = (href: string) => {
|
||||
try {
|
||||
return new URL(href)
|
||||
} catch (e) {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
$: photonified = photonify(href)
|
||||
</script>
|
||||
|
||||
<a
|
||||
href={photonified ?? href}
|
||||
{title}
|
||||
class="hover:underline text-sky-600 dark:text-sky-500"
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
Reference in new issue
Block a user