Skip to content

XML tag with xml:space="preserve" containing only spaces should not be collapsed #402

@ivangreene

Description

@ivangreene

sortpom is suggesting to collapse an XML tag that contains only space characters, even though it has the xml:space="preserve" attribute on it. This is used to configure some plugins, e.g: https://www.habarta.cz/typescript-generator/maven/typescript-generator-maven-plugin/generate-mojo.html#indentString

The diff when trying to use this:

[ERROR]     pom.xml
[ERROR]         @@ -110,7 +110,7 @@
[ERROR]          ··········<classesFromAutomaticJaxrsApplication>true</classesFromAutomaticJaxrsApplication>
[ERROR]          ··········<outputFile>${generated-ts-client-file}</outputFile>
[ERROR]          ··········<mapEnum>asEnum</mapEnum>
[ERROR]         -··········<indentString·xml:space="preserve">··</indentString>
[ERROR]         +··········<indentString·xml:space="preserve"/>
[ERROR]          ··········<noFileComment>true</noFileComment>
[ERROR]          ··········<extensions>
[ERROR]          ············<extension>cz.habarta.typescript.generator.ext.AxiosClientExtension</extension>

(Btw I am using this from spotless)

Metadata

Metadata

Assignees

Labels

bugreleasedThis is now part of the plugin

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions