You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Second block comment on a line is lost and the next expression moves onto the comment line #3487
When a line holds two block comments and nothing else, the second one is dropped and the next expression is moved up onto the line of the first. With a match (or an if) that is no longer valid code; with a plain expression the comment is silently lost:
a
(* b *)(* c *)
b
becomes
a
(* b *) b
One block comment on the line, or a line comment followed by a block comment on the next line, format fine.
Same in 6.3.16, 7.0.3 and 8.0.2. Found in src/Compiler/AbstractIL/ilwrite.fs of dotnet/fsharp.
Extra information
The formatted result breaks my code.
The formatted result gives compiler warnings.
I or my company would be willing to help fix this.
I would like a release if this problem is solved.
Options
Fantomas main branch at 2026-09-22T13:02:48Z - 588898c
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.
Activity
Treat a line of only comments as a single comment
Bump the packages group with 10 updates (#280)