From 1091e7af9922510fcb2fdcc5c4bed34e18c7739f Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Mon, 24 Feb 2014 17:23:18 -0500 Subject: [PATCH] Eliminate non-working text replacements All \r and \n codes have been replaced with
, so the patterns in these replacements don't match anything. This problem has existed for some time -- since commits 1ea27d7 and e12dd32. No attempt is made here to reimplement the replacements because users are now used to the current behavior without much apparent complaint, and such replacements are never perfect and can occasionally fail to work as desired without additional tweaking for special cases. --- src/com/fsck/k9/helper/HtmlConverter.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/com/fsck/k9/helper/HtmlConverter.java b/src/com/fsck/k9/helper/HtmlConverter.java index f1b88b4e3..14eb75fda 100644 --- a/src/com/fsck/k9/helper/HtmlConverter.java +++ b/src/com/fsck/k9/helper/HtmlConverter.java @@ -282,17 +282,6 @@ public class HtmlConverter { // Replace lines of -,= or _ with horizontal rules text = text.replaceAll("\\s*([-=_]{30,}+)\\s*", "
"); - /* - * Unwrap multi-line paragraphs into single line paragraphs that are - * wrapped when displayed. But try to avoid unwrapping consecutive lines - * of text that are not paragraphs, such as lists of system log entries - * or long URLs that are on their own line. - */ - text = text.replaceAll("(?m)^([^\r\n]{4,}[\\s\\w,:;+/])(?:\r\n|\n|\r)(?=[a-z]\\S{0,10}[\\s\\n\\r])", "$1 "); - - // Compress four or more newlines down to two newlines - text = text.replaceAll("(?m)(\r\n|\n|\r){4,}", "\r\n\r\n"); - StringBuffer sb = new StringBuffer(text.length() + TEXT_TO_HTML_EXTRA_BUFFER_LENGTH); sb.append(htmlifyMessageHeader());