mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 01:28:50 -05:00
Issue 3105: Drop newlines in favor of preserving multiple spaces in htmlified text bodies.
This commit is contained in:
parent
cfd1ad7cdb
commit
e12dd323f8
@ -142,7 +142,9 @@ public class HtmlConverter {
|
|||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '\n':
|
case '\n':
|
||||||
buff.append("<br/>\n");
|
// pine treats <br> as two newlines, but <br/> as one newline. Use <br/> so our messages aren't
|
||||||
|
// doublespaced.
|
||||||
|
buff.append("<br />");
|
||||||
break;
|
break;
|
||||||
case '\r':
|
case '\r':
|
||||||
break;
|
break;
|
||||||
@ -182,7 +184,9 @@ public class HtmlConverter {
|
|||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '\n':
|
case '\n':
|
||||||
buff.append("<br/>\n");
|
// pine treats <br> as two newlines, but <br/> as one newline. Use <br/> so our messages aren't
|
||||||
|
// doublespaced.
|
||||||
|
buff.append("<br />");
|
||||||
break;
|
break;
|
||||||
case '&':
|
case '&':
|
||||||
buff.append("&");
|
buff.append("&");
|
||||||
@ -1118,7 +1122,7 @@ public class HtmlConverter {
|
|||||||
final String font = K9.messageViewFixedWidthFont()
|
final String font = K9.messageViewFixedWidthFont()
|
||||||
? "monospace"
|
? "monospace"
|
||||||
: "sans-serif";
|
: "sans-serif";
|
||||||
return "<pre style=\"white-space: normal; word-wrap:break-word; font-family: " + font + "\">";
|
return "<pre style=\"white-space: pre-wrap; word-wrap:break-word; font-family: " + font + "\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String htmlifyMessageFooter() {
|
private static String htmlifyMessageFooter() {
|
||||||
|
Loading…
Reference in New Issue
Block a user