fsprojects / fantomas

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

Block comments in measure are lost or restored twice and in wrong place #2927

Closed dawedawe closed 1 year ago

dawedawe commented 1 year ago

Issue created from fantomas-online

Code

234<(*foo*)kg(* bar *)>

Result

234 (*foo*) (*foo*) <kg>

Problem description

The first comment is restored twice before the < of the measure which breaks the code. The second comment is lost.

Extra information

Options

Fantomas main branch at 2023-07-12T08:15:24Z - 41fe8d62f212d9b2ab786c2a5873f0980e12975e

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.

dawedawe commented 1 year ago

Fixes with https://github.com/fsprojects/fantomas/pull/2925