-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add and document support for tripled-quoted strings
secret = """foo " bar " baz ! """
- Loading branch information
Showing
6 changed files
with
71 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,14 @@ xref:xlat/index.adoc[dynamic expansions]. As with | |
xref:type/string/single.adoc[single-quoted strings], text within | ||
double quotes can include spaces. | ||
|
||
For normally quoted strings, the quotation character can be placed inside of | ||
the string by escaping it with a backslash. | ||
|
||
For triple quoted strings, the quotation character does not need to be | ||
escaped. However, if the string does contain an escaped quotation | ||
character, the quotation character is unescaped, as with normally | ||
quoted strings. | ||
|
||
The main difference between the single and double quoted strings is | ||
that the double quoted strings can be dynamically expanded. The syntax | ||
`${...}` is used for parse-time expansion and `%{...}` is used for | ||
|
@@ -133,6 +141,7 @@ string is being used. | |
`"this has embedded\ncharacters"` + | ||
`"attribute\tvalue\nusername\t%{User-Name}\nreply-message\t%{reply.Reply-Message}"` | ||
`"The result of 'SELECT * FROM foo WHERE 1' is: %sql(SELECT * FROM foo WHERE 1)"` | ||
`"""this string has a "double quoted" string in the middle of it"""` | ||
|
||
// Licenced under CC-by-NC 4.0. | ||
// Copyright (C) 2019 Arran Cudbard-Bell <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters