mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 17:19:06 -05:00
93e2bfe22e
Before this patch the TOML parser would incorrect treat the string "base64data0xdamaged" in a declaration as a hex number because the corresponding check triggers even when the "0x" is inside a double quoted string literal as long as it is followed by at least one hex character.
34 lines
815 B
TOML
34 lines
815 B
TOML
[strings]
|
|
str0 = "deno"
|
|
str1 = """
|
|
Roses are not Deno
|
|
Violets are not Deno either"""
|
|
# On a Unix system, the above multi-line string will most likely be the same as:
|
|
str2 = "Roses are not Deno\nViolets are not Deno either"
|
|
|
|
# On a Windows system, it will most likely be equivalent to:
|
|
str3 = "Roses are not Deno\r\nViolets are not Deno either"
|
|
str4 = "this is a \"quote\""
|
|
|
|
str5 = """
|
|
The quick brown \
|
|
|
|
|
|
fox jumps over \
|
|
the lazy dog."""
|
|
|
|
str6 = """\
|
|
The quick brown \
|
|
fox jumps over \
|
|
the lazy dog.\
|
|
"""
|
|
lines = '''
|
|
The first newline is
|
|
trimmed in raw strings.
|
|
All other whitespace
|
|
is preserved.
|
|
'''
|
|
|
|
withApostrophe = "What if it's not?"
|
|
withSemicolon = "const message = 'hello world';"
|
|
withHexNumberLiteral = "Prevent bug from stripping string here ->0xabcdef"
|