Skip to content

Conversation

@adamyakes
Copy link

@adamyakes adamyakes commented Dec 29, 2025

Summary

The existing example shows that the backslash removes the newline character in the string, however the string literal still (technically unnecessarily) de-indents the beginning of the next line of code to the first column.

I have an intermediate amount of F# experience, but I come across this syntax rarely and skimmed the docs to jog my memory. I saw the code example and the way it was formatted implied to me that the \ wouldn't strip the leading whitespace on the next line if it were there.

I think it would be clearer to show two nearly identical string literals, without and with the backslash, and call out that the former includes both the newline and leading spaces, while the latter has neither.


Internal previews

📄 File 🔗 Preview link
docs/fsharp/language-reference/strings.md Strings

@adamyakes adamyakes requested review from a team and BillWagner as code owners December 29, 2025 16:33
@dotnetrepoman dotnetrepoman bot added this to the December 2025 milestone Dec 29, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-fsharp/svc community-contribution Indicates PR is created by someone from the .NET community. labels Dec 29, 2025
@adamyakes
Copy link
Author

@dotnet-policy-service agree

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

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-fsharp/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant