From: David ‘Bombe’ Roden Date: Thu, 13 Sep 2012 12:12:29 +0000 (+0200) Subject: Remove obsolete method. X-Git-Tag: 0.8.3^2~21 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=68b40899028568615e19e7987987ebc711865ff9;p=Sone.git Remove obsolete method. --- diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index 5f156f1..1936656 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -282,26 +282,4 @@ public class ParserFilter implements Filter { linkTemplate.render(templateContext, writer); } - // - // STATIC METHODS - // - - /** - * Returns up to {@code length} characters from the given text, appending - * “…” if the text is longer. - * - * @param text - * The text to get an excerpt from - * @param length - * The maximum length of the excerpt (without the ellipsis) - * @return The excerpt of the text - */ - private static String getExcerpt(String text, int length) { - String filteredText = text.replaceAll("(\r\n)+", "\r\n").replaceAll("\n+", "\n").replace("\r\n", " ").replace('\n', ' '); - if (filteredText.length() > length) { - return filteredText.substring(0, length) + "…"; - } - return filteredText; - } - }