summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.org>2022-12-03 12:30:46 -0500
committerJakob L. Kreuze <zerodaysfordays@sdf.org>2022-12-03 12:53:21 -0500
commitcce41bf0df30a52a32daedb717c3a21181635dcf (patch)
treedcd9eb83d0d470e5877cd66326749fc699186854
parent94560dbfda98c33b5fbf96cc1a00bb3c1832f74c (diff)
[dynamic] Only call `safe-markdown->sxml' on internal comments
-rw-r--r--haunt/jakob/utils/comments.scm12
1 files changed, 5 insertions, 7 deletions
diff --git a/haunt/jakob/utils/comments.scm b/haunt/jakob/utils/comments.scm
index 8645fb7..e228a6d 100644
--- a/haunt/jakob/utils/comments.scm
+++ b/haunt/jakob/utils/comments.scm
@@ -87,10 +87,10 @@
internal-comment-name)
comment))
(define (comment-content comment)
- ((if (webmention? comment)
- webmention-comment
- internal-comment-comment)
- comment))
+ (if (webmention? comment)
+ `((p ,(webmention-comment comment)))
+ (safe-markdown->sxml
+ (internal-comment-comment comment))))
(define (comment-url comment)
((if (webmention? comment)
webmention-url
@@ -128,9 +128,7 @@
(datetime ,(comment-publish-time comment)))
,(date->string (comment-publish-time comment) "~B ~e, ~Y at ~H:~M")))
(div (@ (class "e-content p-name comment-content"))
- ,@(chain comment
- (comment-content _)
- (safe-markdown->sxml _)))
+ ,@(comment-content comment))
(ul (@ (class "comment-reactions"))
,@(map (match-lambda
((emote . count)