Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove blank line between type extension. #2970

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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