Skip to content

Add support for JSP/JSF in eclipse WTP #645

Closed
@vbrandl

Description

@vbrandl

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'
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions