Open theshoeshiner opened 1 year ago
It looks like the above text was formatted by QuickXML. Browsing the code (which I can't debug because of issues with the Nuget packages), I see that ::writeEOL
and ::writeIndentation
are guarded by a condition that is false
when text is encountered right before a closing tag:
This means QuickXML will not insert a newline between text and a closing tag. In the sample text above, text is adjacent to a closing tag inside the innermost span:
closing tag
...........
v
<span>t</span>
^...
text
Using one of the other formatters, the result is the same or even worse:
All the above were formatted with the same options:
Auto-close tags True
Ensure conformity False
Apply xml:space="preserve" False
Go to Plugins > XMLTools > Options
to find them:
@rdipardo Did you mean to say "SimpleXML"? Your screenshots match what I'm seeing. QuickXML actually produces correct indentation, SimpleXML produces the incorrect indentation that I initially encountered, and StringXML produces even worse indentation.
Im not sure why my installation was defaulting to SimpleXML, since on other machines a fresh install defaulted to QuickXML, but switching to QuickXML is a work-around for this specific issue.
Im using XMLTools 3.1.1.13
When I use the following line of XML:
<table><tr><th><span><span>t</span></span></th></tr></table>
And do pretty print, I get: