Add ellipsis when cutting off a text.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 21 Jun 2011 09:01:14 +0000 (11:01 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 21 Jun 2011 09:01:14 +0000 (11:01 +0200)
src/main/java/net/pterodactylus/sone/template/ParserFilter.java

index 5f6fd3e..2a4d5b4 100644 (file)
@@ -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) {