mirror of
https://github.com/ProjectSegfault/website.git
synced 2024-12-21 20:49:50 +05:30
Add support to markdown
This commit is contained in:
parent
9126593eba
commit
fc4cbc0b08
@ -35,6 +35,7 @@
|
||||
"dependencies": {
|
||||
"@auth/core": "^0.2.5",
|
||||
"@auth/sveltekit": "^0.1.12",
|
||||
"joi": "^17.7.0"
|
||||
"joi": "^17.7.0",
|
||||
"snarkdown": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
696
pnpm-lock.yaml
generated
696
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@
|
||||
import Hero from "$lib/Hero.svelte";
|
||||
import sanitizeHtml from "sanitize-html";
|
||||
import type { PageData } from "./$types";
|
||||
import snarkdown from 'snarkdown';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
@ -46,12 +47,12 @@
|
||||
|
||||
{#if data.announcements.incident.content}
|
||||
<p>
|
||||
{@html sanitizeHtml(
|
||||
{@html snarkdown(sanitizeHtml(
|
||||
data.announcements.incident.content.replace(
|
||||
/\n/g,
|
||||
"<br />"
|
||||
)
|
||||
)}
|
||||
))}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user