-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
string interpolation with multi-line string causes literal part to change #1451
Comments
Hello Jonathan, thank you for reporting this issue. fantomas/src/Fantomas/TokenParser.fs Lines 734 to 737 in e016b1c
Would you be interested to submit a PR for this? |
I would like to try, yes. Thanks for suggesting a place to start. |
Great to hear, please read our Contribution guidelines first as they contain some other useful tips. |
New lines were not being preserved when combining the string tokens of an interpolated string expression. If consecutive tokens are on different lines, then we add an additional NewLine in between. Fixes fsprojects#1451
* Preserve new lines in string portion of interpolated string New lines were not being preserved when combining the string tokens of an interpolated string expression. If consecutive tokens are on different lines, then we add an additional NewLine in between. Fixes #1451 * Minor tweak Co-authored-by: nojaf <florian.verdonck@outlook.com>
Issue created from fantomas-online
Code
Result
Problem description
The combination of a string interpolation and a multi-line string causes fantomas to both add whitespace to the
{ }
expression as well as change the formatting of the string itself after the first interpolation expression found.Extra information
Options
Fantomas Master at 02/12/2021 20:07:06 - e016b1c
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
The text was updated successfully, but these errors were encountered: