From: David ‘Bombe’ Roden Date: Tue, 21 Jun 2011 09:01:14 +0000 (+0200) Subject: Add ellipsis when cutting off a text. X-Git-Tag: 0.6.6^2~62 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=500bac8a74b0ec844ef3007ec3afd7467eba0ce7;p=Sone.git Add ellipsis when cutting off a text. --- diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index 5f6fd3e..2a4d5b4 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -114,7 +114,7 @@ public class ParserFilter implements Filter { if (length >= longText.length()) { shortenedParts.add(part); } else { - shortenedParts.add(new PlainTextPart(longText.substring(0, length))); + shortenedParts.add(new PlainTextPart(longText.substring(0, length) + "…")); } length -= longText.length(); } else if (part instanceof LinkPart) {