Skip to content

Commit a51b590

Browse files
Small correction in documentation (#16772)
I believe that the current doc is confusing a bit. Readers might get confused with the usage `single quote` in the doc with the `'` symbol. I also added an additional message to avoid confusion between that and the triple quote interpolation.
2 parents 75ade8f + 113c573 commit a51b590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/_docs/reference/changed-features/interpolation-escapes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Escapes in interpolations"
44
nightlyOf: https://docs.scala-lang.org/scala3/reference/changed-features/interpolation-escapes.html
55
---
66

7-
In Scala 2 there is no straightforward way to represent a single quote character `"` in a single quoted interpolation. A `\` character can't be used for that because interpolators themselves decide how to handle escaping, so the parser doesn't know whether the `"` character should be escaped or used as a terminator.
7+
In Scala 2 there is no straightforward way to represent a double-quote character `"` in a quoted interpolation (except in triple-quote interpolation). A `\` character can't be used for that because interpolators themselves decide how to handle escaping, so the parser doesn't know whether the `"` character should be escaped or used as a terminator.
88

99
In Scala 3, we can use the `$` meta character of interpolations to escape a `"` character. Example:
1010

0 commit comments

Comments
 (0)