Skip to content

Commit

Permalink
Router: binpack callsite: fix literalsSingleLine
Browse files Browse the repository at this point in the history
In particular, we should relax the nlOnly requirement in that case.
  • Loading branch information
kitbellew committed May 10, 2024
1 parent efc79ed commit 63dbf8f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -1188,10 +1188,11 @@ class Router(formatOps: FormatOps) {
flags.literalArgList

val scalaJsStyleNL = flags.scalaJsStyle && beforeClose.hasBreak
val nlOnly = flags.dangleForTrailingCommas ||
val nlOpen = flags.dangleForTrailingCommas ||
flags.configStyle != ConfigStyle.None ||
style.newlines.keepBreak(newlines) || scalaJsStyleNL ||
tokens.isRightCommentWithBreak(ft)
val nlOnly = nlOpen && !singleLineOnly

def findComma(ft: FormatToken) = findFirstOnRight[T.Comma](ft, close)

Expand Down

0 comments on commit 63dbf8f

Please sign in to comment.