Skip to content

Commit

Permalink
RedundantBraces: ignore block under Term.Xml
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Apr 2, 2024
1 parent 54a6df5 commit 2a09edf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ class RedundantBraces(implicit val ftoks: FormatTokens)
case Some(f: Term.FunctionTerm)
if okToReplaceFunctionInSingleArgApply(f) => removeToken
case Some(_: Term.Interpolate) => handleInterpolation
case Some(_: Term.Xml) => null
case _ => if (processBlock(t)) removeToken else null
}
case _: Term.Interpolate => handleInterpolation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,4 @@ object Test {
<<< #3891 braces within xml
<testcase id={ id }/>
>>>
org.scalafmt.util.FormatException: org.scalafmt.Error$PreciseIncomplete: ...: error: Unable to format file due to bug in scalafmt
<testcase id={ id }/>
^
<testcase id={id}/>

0 comments on commit 2a09edf

Please sign in to comment.