neyestrabelli / xml-formatter

Simple XML Formatter for Atom
MIT License
22 stars 7 forks source link

Formatting Removes Whitespace Separation That Was Originally A Line Break #16

Open randomPoison opened 9 years ago

randomPoison commented 9 years ago

I have an XML file that contains a list of whitespace-separated floating point values. Before I format it the lists look like this:

xml_before

Notice that line breaks are used to separate values. After formatting I run into issues like this:

xml_after

Notice that two values that were separated by a line break have been merged together. At the least when formatting a space should be inserted where a line break has been removed to avoid this issue.

DoctorU commented 7 years ago

This also happens in header nodes, where the namespaces are specified:

    <myNode
    xmlns="namespaceurl" 
    xmlns:ns1="secondnamespace">
        ...
    </myNode>

formats to:

    <myNodexmlns="namespaceurl"xmlns:ns1="secondnamespace">
        ...
    </myNode>

(without spaces).