Skip to content

Commit

Permalink
FormatOps: slightly refactor scala.js policy
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Sep 20, 2024
1 parent 7ce3119 commit 7b98a6c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2746,7 +2746,7 @@ class FormatOps(
def noNLPolicy(): Policy = {
val close = ftBeforeClose.right
if (scalaJsStyle) Policy(Policy.End == close, prefix = "tuckSJS") {
case d: Decision if d.formatToken.right eq close => d.noNewlines
case Decision(`ftBeforeClose`, ss) => Decision.noNewlineSplits(ss)
}
else style.newlines.source match {
case Newlines.keep if closeBreak => decideNewlinesOnlyBeforeClose(close)
Expand Down

0 comments on commit 7b98a6c

Please sign in to comment.