vkiryukhin / vkBeautify

vkBeautify is a small, simple and powerfull javascript plugin to beautify XML, JSON, CSS and SQL text.
http://www.eslinstructor.net/vkbeautify/
Other
316 stars 97 forks source link

it keeps adding line-returns and space even when the content didn't change #18

Open caub opened 8 years ago

caub commented 8 years ago

http://jsbin.com/satogi/edit?html,js,output

seems like a 'leak' to me, no?

bytesnz commented 7 years ago

Happens with splitting XML attributes on to separate lines as well, eg

<?xml version="1.0" encoding="UTF-8"?>
<xh:html
    xmlns:xh="http://www.w3.org/1999/xhtml"
    xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:saxon="http://saxon.sf.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xh:html>

pretty print will output

<?xml version="1.0" encoding="UTF-8"?>
<xh:html

    xmlns:xh="http://www.w3.org/1999/xhtml"

    xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"

    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:saxon="http://saxon.sf.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xh:html>