Make sure swallowNewlines is reset when the text after a block

tag resumes, even if no newline has been encountered.
This commit is contained in:
hns 2003-04-23 10:16:34 +00:00
parent 320d60f19a
commit bdb1cb8f06

View file

@ -496,7 +496,7 @@ public final class HtmlEncoder {
// if (i < l-2) // if (i < l-2)
} }
if ((linebreaks > 0) && !Character.isWhitespace(c)) { if ((linebreaks > 0 || swallowLinebreaks > 0) && !Character.isWhitespace(c)) {
if (!insidePreTag && (linebreaks > swallowLinebreaks)) { if (!insidePreTag && (linebreaks > swallowLinebreaks)) {
linebreaks -= swallowLinebreaks; linebreaks -= swallowLinebreaks;