aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-04-21 14:53:20 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2018-04-21 22:57:19 +0300
commita5b99dce5dbe5d9e681fef59c4efebe2c80c5ce5 (patch)
tree843e1de8e57e3d5eb946dbb0158f2e2be437209b /docs/markdown
parentcb0960a91e1b250a00c0a1e4a40b7e86bc70a97d (diff)
downloadmeson-a5b99dce5dbe5d9e681fef59c4efebe2c80c5ce5.zip
meson-a5b99dce5dbe5d9e681fef59c4efebe2c80c5ce5.tar.gz
meson-a5b99dce5dbe5d9e681fef59c4efebe2c80c5ce5.tar.bz2
Add more tests for multi-line strings and update docs
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Syntax.md3
-rw-r--r--docs/markdown/snippets/more-escape-sequences.md22
2 files changed, 12 insertions, 13 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index 01c8c6e..30eedf8 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -131,7 +131,8 @@ int main (int argc, char ** argv) {
}'''
```
-This can also be combined with the string formatting functionality
+These are raw strings that do not support the escape sequences listed above.
+These strings can also be combined with the string formatting functionality
described below.
#### String formatting
diff --git a/docs/markdown/snippets/more-escape-sequences.md b/docs/markdown/snippets/more-escape-sequences.md
index 2894079..ad78ce2 100644
--- a/docs/markdown/snippets/more-escape-sequences.md
+++ b/docs/markdown/snippets/more-escape-sequences.md
@@ -1,17 +1,15 @@
-## String escape character update
+## String escape character sequence update
-The strings (both single-quoted and triple-quoted) in meson has been taught the
-same set of escape sequences as in Python. It is therefore now possible to use
-arbitrary bytes in strings, like for example NUL (`\0`) and other ASCII control
-characters. See the chapter about *Strings* in *Syntax* for more details.
+Single-quoted strings in meson have been taught the same set of escape
+sequences as in Python. It is therefore now possible to use arbitrary bytes in
+strings, like for example `NUL` (`\0`) and other ASCII control characters. See
+the chapter about [*Strings* in *Syntax*](Syntax.md#strings) for more
+details.
Potential backwards compatibility issue: Any valid escape sequence according to
the new rules will be interpreted as an escape sequence instead of the literal
-characters. Previously only single-quote strings supported escape sequences and
-the supported sequences were `\'`, `\\` and `\n`.
+characters. Previously only the following escape sequences were supported in
+single-quote strings: `\'`, `\\` and `\n`.
-The most likely breakage is usage of backslash-n in triple-quoted strings. It
-is now written in the same way as in single-quoted strings: `\\n` instead of
-`\n`. In general it is now recommended to escape any usage of backslash.
-However, backslash-c (`\c`), for example, is still backslash-c because it isn't
-a valid escape sequence.
+Note that the behaviour of triple-quoted (multiline) strings has not changed.
+They behave like raw strings and do not support any escape sequences.