pmahend1 / PrettyXML

Pretty XML is a XML Formatter extension for Visual Studio Code
MIT License
27 stars 17 forks source link

Allow blank lines would be a nice feature #128

Closed dbraynard closed 11 months ago

dbraynard commented 1 year ago

I often leave blank lines when authoring an msbuild file. It would be nice if this extension could leave blank lines alone. Nice extension, otherwise.

pmahend1 commented 1 year ago

Do you mean blank lines in comments or in general?

dbraynard commented 1 year ago

In general. Throughout the xlm.

pmahend1 commented 1 year ago

I doubt that is possible with current implementation. That is because even space and tabs are considered white-spaces, so formatting might not be what we desire. I will see if I can find way. I will keep this open for further discussion.

dbraynard commented 1 year ago

Thanks. I think this only requires optionally leaving new line characters intact even for empty lines. I liked the formatting otherwise. It is hard to find a formatter that does exactly what I want.

pmahend1 commented 11 months ago

I checked source code again and this is not possible at this time depending on how the XML is parsed for reformatting.