diff options
| author | Jakob L. Kreuze | 2023-08-27 19:39:07 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2023-08-27 19:39:07 -0400 |
| commit | e34974ee4fb88e6832161874d29b373db2153c38 (patch) | |
| tree | f94d9ab991da8f2828a321f741268e454cb0f37d /haunt/jakob/utils | |
| parent | 67efc0047a195d790ec2b493eb1d225183582be4 (diff) | |
[comments] Elide long poster URLs
Diffstat (limited to 'haunt/jakob/utils')
| -rw-r--r-- | haunt/jakob/utils/comments.scm | 11 |
1 files changed, 7 insertions, 4 deletions
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 |