From 3119ef0f004b576d67737bebf517947f8819b4fa Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 22 Jul 2025 18:54:44 -0400 Subject: Render message markdown to HTML inside of ``. This simplifies data flow, at the potential expense of re-rendering HTML more often than strictly necessary. Requiring every path that produces a message-shaped object to pre-render markdown made things more interdependent than intended and slowed me down. --- ui/lib/state/remote/messages.svelte.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ui/lib/state/remote') diff --git a/ui/lib/state/remote/messages.svelte.js b/ui/lib/state/remote/messages.svelte.js index 852f29e..10de27a 100644 --- a/ui/lib/state/remote/messages.svelte.js +++ b/ui/lib/state/remote/messages.svelte.js @@ -1,5 +1,4 @@ import { DateTime } from 'luxon'; -import { render } from '$lib/markdown.js'; class Message { static boot({ id, at, conversation, sender, body }) { @@ -9,17 +8,15 @@ class Message { conversation, sender, body, - renderedBody: render(body), }); } - constructor({ id, at, conversation, sender, body, renderedBody }) { + constructor({ id, at, conversation, sender, body }) { this.id = id; this.at = at; this.conversation = conversation; this.sender = sender; this.body = body; - this.renderedBody = renderedBody; } } -- cgit v1.2.3