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
With C# 11 raw string literals were introduced which remove indentation depending of the position of the closing """ and ignores leading and trailing new lines.
You can create a function which looks at the number of whitespaces on the last line and removes the same number of leading whitespaces from all other lines. But it's very easy to use wrong (for example on strings which where not written as multiline in your code, but just contain "\n") and you won't get any compiler errors/warnings if your lines misalign.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently you have to be careful about the indentation of multiline strings in your code
Describe the solution you'd like
With C# 11 raw string literals were introduced which remove indentation depending of the position of the closing
"""
and ignores leading and trailing new lines.E.g.
F# should support this as well, maybe prefixed with
@
:Describe alternatives you've considered
You can create a function which looks at the number of whitespaces on the last line and removes the same number of leading whitespaces from all other lines. But it's very easy to use wrong (for example on strings which where not written as multiline in your code, but just contain "\n") and you won't get any compiler errors/warnings if your lines misalign.
The text was updated successfully, but these errors were encountered: