mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Preserve plain text spaces
This commit is contained in:
@@ -145,9 +145,14 @@ public class HtmlHelper {
|
||||
}
|
||||
|
||||
// Pre formatted text
|
||||
for (Element code : document.select("pre")) {
|
||||
code.html(code.html().replaceAll("\\r?\\n", "<br>"));
|
||||
code.tagName("div");
|
||||
for (Element pre : document.select("pre")) {
|
||||
String[] lines = pre.html().split("\\r?\\n");
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
if (!"-- ".equals(lines[i]))
|
||||
lines[i] = lines[i].replace(" ", " ");
|
||||
}
|
||||
pre.html(TextUtils.join("<br>", lines));
|
||||
pre.tagName("div");
|
||||
}
|
||||
|
||||
// Code
|
||||
|
||||
Reference in New Issue
Block a user