diff --git a/src/Fantomas.Tests/TypeDeclarationTests.fs b/src/Fantomas.Tests/TypeDeclarationTests.fs index 46b534280a..624ae2ea3d 100644 --- a/src/Fantomas.Tests/TypeDeclarationTests.fs +++ b/src/Fantomas.Tests/TypeDeclarationTests.fs @@ -1000,4 +1000,34 @@ and [] Room = { Details: Details Items: Item list Exits: Exits } +""" + +[] +let ``trivia newlines between letbinding of type, 709`` () = + formatSourceString false """ +open Xunit +open FSharp.Core +open Swensen.Unquote + +type FormattingSpecs() = + + [] + let ``true is true``() = test <@ true = true @> + + [] + let ``false is false``() = test <@ false = false @> +""" config + |> prepend newline + |> should equal """ +open Xunit +open FSharp.Core +open Swensen.Unquote + +type FormattingSpecs() = + + [] + let ``true is true``() = test <@ true = true @> + + [] + let ``false is false``() = test <@ false = false @> """ \ No newline at end of file diff --git a/src/Fantomas/SourceParser.fs b/src/Fantomas/SourceParser.fs index 9598ea4257..2df1ad15eb 100644 --- a/src/Fantomas/SourceParser.fs +++ b/src/Fantomas/SourceParser.fs @@ -1310,4 +1310,5 @@ let getRangesFromAttributesFromSynMemberDefinition (mdn: SynMemberDefn) = match mdn with | SynMemberDefn.Member(mb,_) -> getRangesFromAttributesFromSynBinding mb | SynMemberDefn.AbstractSlot(valSig, _, _) -> getRangesFromAttributesFromSynValSig valSig + | SynMemberDefn.LetBindings(lb::_,_,_,_) -> getRangesFromAttributesFromSynBinding lb | _ -> [] \ No newline at end of file