fsprojects / fantomas

FSharp source code formatter
https://fsprojects.github.io/fantomas
Other
761 stars 190 forks source link

Comment lost after named pat pair #2953

Closed nojaf closed 6 months ago

nojaf commented 10 months ago

Issue created from fantomas-online

Code

match synExpr with
| SynExpr.App(
    argExpr = SynExpr.Match _ // | SynExpr.MatchBang
    )
     ->
Some ident.idRange
| _ -> defaultTraverse synExpr

Result

match synExpr with
| SynExpr.App(argExpr = SynExpr.Match _) -> Some ident.idRange
| _ -> defaultTraverse synExpr

Problem description

Trivia is assigned to NamePatPair

Extra information

Options

Fantomas main branch at 2023-08-31T06:37:49Z - 369faf81362e7ddb3fce3bd4505216055af35347

Default Fantomas configuration

Did you know that you can ignore files when formatting by using a .fantomasignore file? PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.