Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting code makes Interpolated verbatim strings to non-verbatim strings, which breaks the code #1645

Closed
DedSec256 opened this issue Apr 14, 2021 · 1 comment · Fixed by #1652

Comments

@DedSec256
Copy link
Contributor

Issue created from fantomas-online

Code

let main _ =
    let oldId = 1
    let newId = 2
    printfn $@"Migrate notes of file ""{oldId}"" to new file ""{newId}""."
    0

Result

let main _ =
    let oldId = 1
    let newId = 2
    printfn $"Migrate notes of file "{oldId}" to new file "{newId}"."
    0

Options

Fantomas Master at 04/14/2021 13:41:07 - e164e23

Default Fantomas configuration

@nojaf
Copy link
Contributor

nojaf commented Apr 15, 2021

Hey, thanks for reporting, at first glance I thought this combination is not possible, to begin with.
https://github.com/dotnet/fsharp/blob/6b1af129b798d0b3b7c296b27e8c2a5ad4f1dad8/src/fsharp/lexhelp.fs#L144-L152
The information is not present currently in the next FCS 40, so I'd like to see it added there as well.

I can fix this short term using the F# tokens but I feel like it should be added to the compiler properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants