Skip to content

Commit

Permalink
Same fix but for tuples. Fixes fsprojects#842.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Aug 16, 2020
1 parent ea14d4d commit 99e88ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Fantomas.Tests/OperatorTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,8 @@ let ``should break on . operator and keep indentation``() =
""" { config with MaxLineLength = 80; MaxInfixOperatorExpression = 60 }
|> should equal """let pattern =
(x + y)
.Replace
(seperator + "**" + seperator,
replacementSeparator + "(.|?" + replacementSeparator + ")?")
.Replace(seperator + "**" + seperator,
replacementSeparator + "(.|?" + replacementSeparator + ")?")
.Replace("**" + seperator, ".|(?<=^|" + replacementSeparator + ")")
"""
Expand Down
3 changes: 2 additions & 1 deletion src/Fantomas/CodePrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,8 @@ and genExpr astContext synExpr =
let genMultilineExpr =
match e with
| Paren(Lambda(_)) -> atCurrentColumnIndent(genExpr astContext e)
| Paren(App(_)) ->
| Paren(App(_))
| Paren(Tuple(_)) ->
atCurrentColumn(genExpr astContext e)
| _ ->
ifElse hasParenthesis
Expand Down

0 comments on commit 99e88ca

Please sign in to comment.