summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
Diffstat (limited to 'Omni')
-rw-r--r--Omni/Jr/Web.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs
index b76f1fa..6f5029d 100644
--- a/Omni/Jr/Web.hs
+++ b/Omni/Jr/Web.hs
@@ -1624,7 +1624,7 @@ instance Lucid.ToHtml TaskDetailPage where
renderComment :: (Monad m) => UTCTime -> TaskCore.Comment -> Lucid.HtmlT m ()
renderComment currentTime c =
Lucid.div_ [Lucid.class_ "comment-card"] <| do
- Lucid.p_ [Lucid.class_ "comment-text"] (Lucid.toHtml (TaskCore.commentText c))
+ Lucid.div_ [Lucid.class_ "comment-text markdown-content"] (renderMarkdown (TaskCore.commentText c))
Lucid.div_ [Lucid.class_ "comment-meta"] <| do
Lucid.span_ [Lucid.class_ ("comment-author " <> authorClass)] (Lucid.toHtml (authorLabel (TaskCore.commentAuthor c)))
Lucid.span_ [Lucid.class_ "comment-time"] (renderRelativeTimestamp currentTime (TaskCore.commentCreatedAt c))
@@ -2545,11 +2545,10 @@ renderCollapsibleOutput content =
renderTextWithNewlines :: (Monad m) => Text -> Lucid.HtmlT m ()
renderTextWithNewlines txt =
let parts = Text.splitOn "\\n" txt
- in traverse_ renderPart (zip [0 ..] parts)
- where
- renderPart (idx, part) = do
- Lucid.toHtml part
- when (idx < length parts - 1) <| Lucid.br_ []
+ renderPart idx part = do
+ Lucid.toHtml part
+ when (idx < length parts - 1) <| Lucid.br_ []
+ in traverse_ (uncurry renderPart) (zip [0 ..] parts)
-- | Decode JSON tool result and render in a user-friendly way
renderDecodedToolResult :: (Monad m) => Text -> Lucid.HtmlT m ()