From d771fc7d0b45f8fa66f6570720fba73941de67cd Mon Sep 17 00:00:00 2001 From: Peter Lesslie Date: Fri, 15 Apr 2022 15:02:14 -0500 Subject: Add support for multiline f-strings + Extend the parser to recognize the multiline f-strings, which the documentation already implies will work. The syntax is like: ``` x = 'hello' y = 'world' msg = f'''This is a multiline string. Sending a message: '@x@ @y@' ''' ``` which produces: ``` This is a multiline string. Sending a message: 'hello world' ``` + Added some f-string tests cases to "62 string arithmetic" to exercise the new behavior. --- docs/markdown/Syntax.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/markdown/Syntax.md') diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index b3b328f..a942af0 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -178,7 +178,7 @@ These are raw strings that do not support the escape sequences listed above. These strings can also be combined with the string formatting functionality via `.format()` described below. -Note that multiline f-strings are not supported. +Note that multiline f-string support was added in version 0.63. ### String index @@ -211,8 +211,8 @@ As can be seen, the formatting works by replacing placeholders of type *(Added 0.58)* Format strings can be used as a non-positional alternative to the -string formatting functionality described above. Note that multiline f-strings -are not supported. +string formatting functionality described above. Note that multiline f-string +support was added in version 0.63. ```meson n = 10 -- cgit v1.1