From 68b40899028568615e19e7987987ebc711865ff9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 13 Sep 2012 14:12:29 +0200 Subject: [PATCH] Remove obsolete method. --- .../pterodactylus/sone/template/ParserFilter.java | 22 ---------------------- 1 file changed, 22 deletions(-) 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; - } - } -- 2.7.4