Skip to content
Snippets Groups Projects
Commit eaaca080 authored by Trirst's avatar Trirst
Browse files

Markdown parser in commentary

parent 5045812c
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import { paths } from "@/static/js/paths"; import { paths } from "@/static/js/paths";
import { user } from "@/stores"; import { user } from "@/stores";
import { push } from "svelte-spa-router"; import { push } from "svelte-spa-router";
import marked from "marked";
export let params = {}; export let params = {};
let imageMetadata = {}; let imageMetadata = {};
...@@ -138,9 +139,9 @@ ...@@ -138,9 +139,9 @@
> >
{/if} {/if}
{#if originalComment} {#if originalComment}
<div>{imageMetadata.commentary}</div> <div>{@html marked(imageMetadata.commentary)}</div>
{:else} {:else}
<div>{imageMetadata.commentary_translation}</div> <div>{@html marked(imageMetadata.commentary_translation)}</div>
{/if} {/if}
</div> </div>
{/if} {/if}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment