|
|
@ -2015,8 +2015,8 @@ public class HtmlHelper {
|
|
|
|
|
|
|
|
|
|
|
|
// https://tools.ietf.org/html/rfc3676
|
|
|
|
// https://tools.ietf.org/html/rfc3676
|
|
|
|
static String flow(String text, boolean delsp) {
|
|
|
|
static String flow(String text, boolean delsp) {
|
|
|
|
boolean continuation = false;
|
|
|
|
|
|
|
|
boolean inquote = false;
|
|
|
|
boolean inquote = false;
|
|
|
|
|
|
|
|
boolean continuation = false;
|
|
|
|
StringBuilder flowed = new StringBuilder();
|
|
|
|
StringBuilder flowed = new StringBuilder();
|
|
|
|
String[] lines = text.split("\\r?\\n");
|
|
|
|
String[] lines = text.split("\\r?\\n");
|
|
|
|
for (int l = 0; l < lines.length; l++) {
|
|
|
|
for (int l = 0; l < lines.length; l++) {
|
|
|
@ -2045,9 +2045,11 @@ public class HtmlHelper {
|
|
|
|
continuation = (line.endsWith(" ") && !"-- ".equals(line));
|
|
|
|
continuation = (line.endsWith(" ") && !"-- ".equals(line));
|
|
|
|
|
|
|
|
|
|
|
|
flowed.append(line);
|
|
|
|
flowed.append(line);
|
|
|
|
|
|
|
|
|
|
|
|
if (!continuation)
|
|
|
|
if (!continuation)
|
|
|
|
flowed.append("\r\n");
|
|
|
|
flowed.append("\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return flowed.toString();
|
|
|
|
return flowed.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|