From e34974ee4fb88e6832161874d29b373db2153c38 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 27 Aug 2023 19:39:07 -0400 Subject: [comments] Elide long poster URLs --- haunt/jakob/utils/comments.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'haunt/jakob/utils') diff --git a/haunt/jakob/utils/comments.scm b/haunt/jakob/utils/comments.scm index 0d65e8d..4ec3718 100644 --- a/haunt/jakob/utils/comments.scm +++ b/haunt/jakob/utils/comments.scm @@ -23,6 +23,7 @@ #:use-module (ice-9 receive) #:use-module (jakob dynamic capabilities common) #:use-module (jakob dynamic util) + #:use-module (jakob utils) #:use-module (json) #:use-module (oop goops) #:use-module (srfi srfi-9) @@ -92,10 +93,12 @@ (safe-markdown->sxml (internal-comment-comment comment)))) (define (comment-url comment) - ((if (webmention? comment) - webmention-url - internal-comment-url) - comment)) + (define text + ((if (webmention? comment) + webmention-url + internal-comment-url) + comment)) + (elide-string text 32)) (define (comment-publish-time comment) ((if (webmention? comment) webmention-publish-time -- cgit v1.3