Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let xmlFragment1 = @"<book author=""Milton, John"" title=""Paradise Lost"">"
let xmlFragment2 = """<book author="Milton, John" title="Paradise Lost">"""
```

In code, strings that have line breaks are accepted and the line breaks are interpreted as the newline encoding used in source, unless a backslash character is the last character before the line break. Leading white space on the next line is ignored when the backslash character is used. The following code produces a string `str1` that has value `"abc\ndef"` and a string `str2` that has value `"abcdef"`.
In code, strings that have line breaks are accepted and the line breaks are interpreted as the newline encoding used in source, unless a backslash character is the last character before the line break. Leading white space on the next line is ignored when the backslash character is used. The following code produces a string `str1` that has value `"abc\n def"` and a string `str2` that has value `"abcdef"`.

[!code-fsharp[Main](~/samples/snippets/fsharp/lang-ref-1/snippet1001.fs)]

Expand Down
4 changes: 2 additions & 2 deletions samples/snippets/fsharp/lang-ref-1/snippet1001.fs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let str1 =
"abc
def"
def"

let str2 =
"abc\
def"
def"
Loading