revelc/formatter-maven-plugin

Issues with prior jsoup adding extra blank lines does not remove those lines with latest 2.18.0

Opened this issue · 0 comments

Prior to formatter-maven-plugin 2.18.0, jsoup had a bug that caused extra blank lines to be added each time file was formatted when it had inline javascript. This was fixed in 2.18.0. However, the extra blank lines are not then removed. We need to add one more enhancement similar to what is being done in the xml formatter that will remove duplicate blank lines (for example 3 blank lines should just be 1). Given that is via jsoup, the fix will likely need made there similar to what is being done with the xml formatter which I believe we have planned given some further code updates for 2.19.0 either later this month or into April 2022.

In order to see this, we will need to adjust our current html file test that is really hosed to have a lot of empty blank spaces. So it should then format + remove blank lines to be considered appropriate on our two pass formatting model.

I plan to look to this in coming weekend now that it has been confirmed as still partial issue in the wild.