Skip to content
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [8.0.0-alpha-006] - 2026-03-09

### Fixed

- Space between uppercase function name and uppercase parameter was dropped. [#3264](https://github.com/fsprojects/fantomas/pull/3264)

## [8.0.0-alpha-005] - 2026-03-09

### Fixed
Expand Down
10 changes: 10 additions & 0 deletions src/Fantomas.Core.Tests/LetBindingTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2324,3 +2324,13 @@ let processSnippetLine
let lineStr = lines.[line]
()
"""

[<Test>]
let ``uppercase function name with uppercase parameter should preserve space`` () =
formatSourceString "let F P = 1" config
|> prepend newline
|> should
equal
"""
let F P = 1
"""
3 changes: 2 additions & 1 deletion src/Fantomas.Core/CodePrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2914,7 +2914,8 @@ let genBinding (b: BindingNode) (ctx: Context) : Context =
| _, Pattern.Paren _
| _, Pattern.Unit _ -> spaceBefore
| _, Pattern.Named _
| _, Pattern.Wild _ -> true
| _, Pattern.Wild _
| _, Pattern.LongIdent _ -> true
| content, _ ->
match List.tryLast content with
| None -> false
Expand Down