Open
Description
Issue created from fantomas-online
Code
let foo =
if bar then
a <- 1
else
// whatnot
if baz then
quux <- 3
Result
let foo =
if bar then
a <- 1
else if
// whatnot
baz
then
quux <- 3
Problem description
The comment has been moved with respect to the if
statement. Expected instead was:
let foo =
if bar then
a <- 1
else
// whatnot
if baz then
quux <- 3
(or, in my own codebase with ExperimentalKeepIndentInBranch, I expected no change to the formatting).
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 2023-12-06T16:47:58Z - 0f8ee23
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.