You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I get the XML from the SAXReader, I get the XML tags and the empty whitespace between the tags. In order to identify the empty lines I use a regex: [\t ]*\r?\n?[\t ]* that unfortunately also identified your two spaces. Your text was removed and you got the empty tag.
I have changed the regex to the following: [\t ]*(\r|\n|\r\n)[\t ]* which solves your problem. but if somebody has the need to set a newline as text in an XML tag with xml:space="preserve" they will encounter the same problem.
Currently, I'm seeing if I get the SAXParser to only return XML tags and any text that is directly wrapped by those tags.
sortpom is suggesting to collapse an XML tag that contains only space characters, even though it has the
xml:space="preserve"
attribute on it. This is used to configure some plugins, e.g: https://www.habarta.cz/typescript-generator/maven/typescript-generator-maven-plugin/generate-mojo.html#indentStringThe diff when trying to use this:
(Btw I am using this from spotless)
The text was updated successfully, but these errors were encountered: