fix: re-enabled output of <br> elements in format() method with additional class attribute to signify where it comes from

This commit is contained in:
Tobi Schäfer 2015-08-14 14:23:22 +02:00
parent 80dfe53204
commit 735de0bbf6

View file

@ -576,9 +576,9 @@ public final class HtmlEncoder {
// treat entering a SEMIBLOCK as entering a TEXT
int _entering = entering == SEMIBLOCK ? TEXT : entering;
for (int k = linebreaks-1; k>=0; k--) {
/*if (k >= swallowBreaks && k >= _entering && k >= exiting) {
ret.append("<br />");
}*/
if (k >= swallowBreaks && k >= _entering && k >= exiting) {
ret.append("<br class='helma-format' />");
}
ret.append(newLine);
}
if (exiting >= SEMIBLOCK || linebreaks > 1) {
@ -807,9 +807,9 @@ public final class HtmlEncoder {
if (linebreaks > 0) {
for (int i = linebreaks-1; i>=0; i--) {
/*if (i >= swallowBreaks && i > exiting) {
ret.append("<br />");
}*/
if (i >= swallowBreaks && i > exiting) {
ret.append("<br class='helma-format' />");
}
ret.append(newLine);
}
}
@ -903,7 +903,7 @@ public final class HtmlEncoder {
case '\n':
if (encodeNewline) {
ret.append("<br />");
ret.append("<br class='helma-format' />");
}
ret.append('\n');
break;