Closed
Description
When formatting some JSF inside a style
attribute, the formatter destroys the JSF by stripping the closing }
.
This happens on Gradle 6.4.1 with the plugin version 5.0.0 as well as with Gradle 6.0.1 and plugin version 4.3.0.
Here is a minimal example to reproduce the issue: https://github.com/vbrandl/spotless-formatting-jsf-reprod
After running ./gradlew spotlessApply
in the repository, the diff looks like this:
<div
- style="width: 30px; height: 20px; background: #{someControllerName.someFunctionToGetTheColor(x)}" />
+ style="width: 30px; height: 20px; background: #{someControllerName.someFunctionToGetTheColor(x)" />
The following configuration is used:
spotless {
format 'xml', {
// ratchetFrom 'origin/master'
target '**/*.xhtml'
eclipseWtp('html')
indentWithSpaces(2)
endWithNewline()
trimTrailingWhitespace()
encoding 'UTF-8'
}
}