split xml text out of tags on whitespaces

This commit is contained in:
Dennis Ushakov
2017-10-12 19:16:34 +03:00
parent 476bb7db0b
commit c003f3c591
@@ -84,7 +84,12 @@ public class HtmlParsing {
xmlText = startText(xmlText); xmlText = startText(xmlText);
parseReference(); parseReference();
} }
else if (tt == XmlTokenType.XML_REAL_WHITE_SPACE || tt == XmlTokenType.XML_DATA_CHARACTERS) { else if (tt == XmlTokenType.XML_REAL_WHITE_SPACE) {
error = flushError(error);
xmlText = terminateText(xmlText);
advance();
}
else if (tt == XmlTokenType.XML_DATA_CHARACTERS) {
error = flushError(error); error = flushError(error);
xmlText = startText(xmlText); xmlText = startText(xmlText);
advance(); advance();
@@ -283,6 +288,9 @@ public class HtmlParsing {
error(XmlErrorMessages.message("xml.parsing.closing.tag.is.not.done")); error(XmlErrorMessages.message("xml.parsing.closing.tag.is.not.done"));
} }
if (hasTags()) doneTag(myTagMarkersStack.peek()); if (hasTags()) doneTag(myTagMarkersStack.peek());
} else if (token() == XmlTokenType.XML_REAL_WHITE_SPACE && !hasTags()) {
xmlText = terminateText(xmlText);
advance();
} else { } else {
xmlText = startText(xmlText); xmlText = startText(xmlText);
advance(); advance();