From 1ab7f8af56f8514379a483f7cc2f5c3b226f9e08 Mon Sep 17 00:00:00 2001 From: secondl1ght Date: Fri, 15 Dec 2023 20:16:23 -0700 Subject: [PATCH] await markdown parsing --- src/routes/tagger/[id]/+page.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/tagger/[id]/+page.svelte b/src/routes/tagger/[id]/+page.svelte index 17c9aa4c..6a0a36b0 100644 --- a/src/routes/tagger/[id]/+page.svelte +++ b/src/routes/tagger/[id]/+page.svelte @@ -63,7 +63,7 @@ let leaflet: Leaflet; let DomEvent: DomEventType; - const initializeData = () => { + const initializeData = async () => { if (dataInitialized) return; const userFound = $users.find((user) => user.id == data.user); @@ -293,7 +293,8 @@ eventElements = eventElements; // add markdown support for profile description - profileDesc.innerHTML = DOMPurify.sanitize(marked.parse(filteredDesc)); + const markdown = await marked.parse(filteredDesc); + profileDesc.innerHTML = DOMPurify.sanitize(markdown); const setupChart = () => { tagTypeChart = new Chart(tagTypeChartCanvas, {