text->html now does a better job converting

---------------------------------------------------------
This commit is contained in:
Jesse Vincent 2009-11-28 04:56:47 +00:00
parent cdf0693e27
commit 46ddc7d8e5
1 changed files with 5 additions and 0 deletions

View File

@ -1993,6 +1993,7 @@ public class LocalStore extends Store implements Serializable
Log.e(Email.LOG_TAG, null, e);
}
text = buff.toString();
text = text.replaceAll("\\s*([-=_]{30,}+)\\s*","<hr />");
Matcher m = Regex.WEB_URL_PATTERN.matcher(text);
StringBuffer sb = new StringBuffer(text.length() + 512);
@ -2009,6 +2010,10 @@ public class LocalStore extends Store implements Serializable
m.appendReplacement(sb, "$0");
}
}
m.appendTail(sb);
sb.append("</pre></body></html>");
text = sb.toString();