Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96958569 authored by Jesse Vincent's avatar Jesse Vincent
Browse files

huge improvements to render quality of plaintext messages.

parent 46ddc7d8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1994,10 +1994,14 @@ public class LocalStore extends Store implements Serializable
            }
            text = buff.toString();
            text = text.replaceAll("\\s*([-=_]{30,}+)\\s*","<hr />");
            text = text.replaceAll("(?m)^(.{50,}[\\w,:;+/])\\s*[\r\n]{1,4}(?!\\W)","$1 ");

            text = text.replaceAll("(?m)[\r\n]{3,}","\n\n");


            Matcher m = Regex.WEB_URL_PATTERN.matcher(text);
            StringBuffer sb = new StringBuffer(text.length() + 512);
            sb.append("<html><body><pre style=\"white-space: pre-wrap;\">");
            sb.append("<html><body><pre style=\"white-space: pre-wrap; word-wrap:break-word; \">");
            while (m.find())
            {
                int start = m.start();