Skip to content

Commit

Permalink
Router: fix consistency based on src NL existence
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Sep 28, 2024
1 parent b81bb7a commit a32887c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ class Router(formatOps: FormatOps) {
) Seq(baseSplit)
else if (nft.right.is[T.KwCase]) getNLOnlySplit
else if (hasBreak() && !beforeMultiline.ignoreSourceSplit)
getNLOnlySplit
if ((beforeMultiline eq Newlines.keep) && !bodyIsEmpty)
getFolded(isKeep = true).filter(_.isNL)
else getNLOnlySplit
else if (bodyIsEmpty)
if (rt.isAny[T.RightBrace, T.Semicolon])
Seq(baseSplit, nlSplit(nft)(1))
Expand Down

0 comments on commit a32887c

Please sign in to comment.