diff --git a/src/lib/components/PostCard.svelte b/src/lib/components/PostCard.svelte index 56147e9..5f9a87f 100644 --- a/src/lib/components/PostCard.svelte +++ b/src/lib/components/PostCard.svelte @@ -44,6 +44,16 @@ let cargandoLike = $state(false); let errorLike = $state(false); + let contenido = $derived(() => { + let t = post.content.replaceAll('\n', '
'); + t = t.replace( + /#\w*/gm, + (match) => + `${match}` + ); + return t; + }); + async function handleBorrar() { await deletePost( post, @@ -127,7 +137,7 @@ -

{@html post.content.replaceAll('\n', '
')}

+

{@html contenido()}

{#if post.imageUrl}