Skip to content

Commit

Permalink
Remove blank line between type extension. (#2970)
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf authored Nov 3, 2023
1 parent 0aabadd commit 5c9e498
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Fantomas.Core.Tests/DallasTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ type Foo with
equal
"""
type Foo with
member x.Bar = ()
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ type Color =
"""

[<Test>]
let ``type augmentation with members`` () =
let ``type augmentation with members should not add newline`` () =
formatSourceString
false
"""
Expand All @@ -133,7 +133,6 @@ type HttpContext with
equal
"""
type HttpContext with
member this.QueryString() = "?"
"""

Expand Down Expand Up @@ -232,7 +231,6 @@ type HttpContext with
namespace Signature
type HttpContext with
member QueryString: unit -> string
"""

Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Core/CodePrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3535,7 +3535,7 @@ let genTypeDefn (td: TypeDefn) =
header
+> sepSpace
+> optSingle genSingleTextNode typeName.WithKeyword
+> indentSepNlnUnindent (sepNlnBetweenTypeAndMembers typeDefnNode +> genMemberDefnList members)
+> indentSepNlnUnindent (genMemberDefnList members)
|> genNode node
| TypeDefn.Delegate node ->
header
Expand Down

0 comments on commit 5c9e498

Please sign in to comment.