Skip to content

Commit

Permalink
Truncate long links in comment preview
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDaub committed Jan 28, 2025
1 parent 3b9d063 commit 2d0715f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/components/row.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export function truncateComment(comment, maxLength = 180) {
comment.slice(0, lastLinkStart).trim(),
);
if (beforeLink && beforeLink.length > 0) {
return beforeLink + " " + truncatedLink + "...";
return beforeLink + " " + truncateLongWords(truncatedLink) + "...";
} else {
return truncatedLink + "...";
}
Expand Down

0 comments on commit 2d0715f

Please sign in to comment.