diff options
| -rw-r--r-- | jakob/utils/comments.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/jakob/utils/comments.scm b/jakob/utils/comments.scm index 966d2dc..2fae64d 100644 --- a/jakob/utils/comments.scm +++ b/jakob/utils/comments.scm @@ -93,12 +93,15 @@ (safe-markdown->sxml (internal-comment-comment comment)))) (define (comment-url comment) - (define text + (define url ((if (webmention? comment) webmention-url internal-comment-url) comment)) - (elide-string text 32)) + (if (not (or (string-prefix? "http://" url) + (string-prefix? "https://" url))) + (format #f "http://~a" url) + url)) (define (comment-publish-time comment) ((if (webmention? comment) webmention-publish-time @@ -134,7 +137,7 @@ The I2P logo belongs to The I2P Project, and is licensed under the CC BY 4.0") `(" • " (a (@ (class "author-url") (href ,(comment-url comment))) - "(" ,(strip (comment-url comment)) ")")) + "(" ,(elide-string (strip (comment-url comment)) 32) ")")) `()) " • " (time (@ (class "dt-published") |