From 3119ef0f004b576d67737bebf517947f8819b4fa Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Tue, 22 Jul 2025 18:54:44 -0400
Subject: Render message markdown to HTML inside of `<Message />`.

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/routes/(swatch)/.swatch/MessageRun/+page.svelte | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'ui/routes/(swatch)/.swatch/MessageRun/+page.svelte')

diff --git a/ui/routes/(swatch)/.swatch/MessageRun/+page.svelte b/ui/routes/(swatch)/.swatch/MessageRun/+page.svelte
index 34118ec..30aeee4 100644
--- a/ui/routes/(swatch)/.swatch/MessageRun/+page.svelte
+++ b/ui/routes/(swatch)/.swatch/MessageRun/+page.svelte
@@ -1,8 +1,6 @@
 <script>
   import { DateTime } from 'luxon';
 
-  import { render } from '$lib/markdown.js';
-
   import MessageRun from '$lib/components/MessageRun.svelte';
   import Message from '$lib/components/Message.svelte';
 
@@ -59,7 +57,7 @@ quis arcu. Ut a dapibus augue. Pellentesque nec tincidunt sem.`,
 <div class="component-preview">
   <MessageRun {sender} class={cssClass}>
     {#each messages.entries() as [index, message]}
-      <Message id="Mplaceholder-{index}" at={DateTime.now()} renderedBody={render(message)} />
+      <Message id="Mplaceholder-{index}" at={DateTime.now()} body={message} />
     {/each}
   </MessageRun>
 </div>
-- 
cgit v1.2.3

