add config support
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
= """
|
||||
Roses are red
|
||||
Violets are blue"""
|
||||
|
||||
# On a Unix system, the above multi-line string will most likely be the same as:
|
||||
= "Roses are red\nViolets are blue"
|
||||
|
||||
# On a Windows system, it will most likely be equivalent to:
|
||||
= "Roses are red\r\nViolets are blue"
|
||||
|
||||
= """Here are two quotation marks: "". Simple enough."""
|
||||
= """Here are three quotation marks: ""\"."""
|
||||
= """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
|
||||
|
||||
# "This," she said, "is just a pointless statement."
|
||||
= """"This," she said, "is just a pointless statement.""""# What you see is what you get.
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
# integers
|
||||
= [ 1, 2, 3 ]
|
||||
|
||||
# colors
|
||||
= [ "red", "yellow", "green" ]
|
||||
|
||||
# nested
|
||||
= [ [ 1, 2 ], [3, 4, 5] ]
|
||||
= [ [ 1, 2 ], ["a", "b", "c"] ]
|
||||
= [ "all", 'strings', """are the same""", '''type''' ]
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Mixed-type arrays are allowed
|
||||
= [ 0.1, 0.2, 0.5, 1.0, 2, 5 ]
|
||||
= [
|
||||
"Foo Bar <foo@example.com>",
|
||||
{ }
|
||||
]
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# multiline
|
||||
= [
|
||||
1, 2, 3
|
||||
]
|
||||
|
||||
# extra comma at end
|
||||
= [
|
||||
1,
|
||||
2, # this is ok
|
||||
]
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
= { }
|
||||
@@ -0,0 +1,17 @@
|
||||
# all results are the same
|
||||
|
||||
= "abc"
|
||||
|
||||
= """
|
||||
a\
|
||||
|
||||
|
||||
b\
|
||||
c"""
|
||||
|
||||
= """\
|
||||
a\
|
||||
b\
|
||||
c\
|
||||
"""
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# line-ending backslash with whitespace "geeee\ "
|
||||
# result should be "heeee\ngeeee"
|
||||
|
||||
= """
|
||||
heeee
|
||||
geeee\
|
||||
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,2 @@
|
||||
= "\t tab tab tab \t"
|
||||
= "\e There is no escape! \e"
|
||||
@@ -0,0 +1 @@
|
||||
= inf
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
= 2023-01-01T12:34:56.123456789Z
|
||||
= 2023-01-01T12:34:56.123456789
|
||||
= 07:32:00.123456789
|
||||
@@ -0,0 +1,11 @@
|
||||
= 'C:\Users\nodejs\templates'
|
||||
= '\\ServerX\admin$\system32\'
|
||||
= 'Tom "Dubs" Preston-Werner'
|
||||
= '<\i\c*\s*>'
|
||||
= '''I [dw]on't need \d{2} apples'''
|
||||
= '''
|
||||
The first newline is
|
||||
trimmed in raw strings.
|
||||
All other whitespace
|
||||
is preserved.
|
||||
'''
|
||||
@@ -0,0 +1,7 @@
|
||||
= '''Here are fifteen quotation marks: """""""""""""""'''
|
||||
|
||||
# apos15 = '''Here are fifteen apostrophes: '''''''''''''''''' # INVALID
|
||||
= "Here are fifteen apostrophes: '''''''''''''''"
|
||||
|
||||
# 'That,' she said, 'is still pointless.'
|
||||
= ''''That,' she said, 'is still pointless.''''
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
= "pi"
|
||||
= +99
|
||||
= 42
|
||||
= 0
|
||||
= -17
|
||||
= 1_000
|
||||
= 5_349_221
|
||||
= 53_49_221 # Indian number system grouping
|
||||
= 1_2_3_4_5 # VALID but discouraged
|
||||
@@ -0,0 +1,11 @@
|
||||
# hexadecimal with prefix `0x`
|
||||
= 0xDEADBEEF
|
||||
= 0xdeadbeef
|
||||
= 0xdead_beef
|
||||
|
||||
# octal with prefix `0o`
|
||||
= 0o01234567
|
||||
= 0o755 # useful for Unix file permissions
|
||||
|
||||
# binary with prefix `0b`
|
||||
= 0b11010110
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
# fractional
|
||||
= +1.0
|
||||
= 3.1415
|
||||
= -0.01
|
||||
|
||||
# exponent
|
||||
= 5e+22
|
||||
= 1e06
|
||||
= -2E-2
|
||||
|
||||
# both
|
||||
= 6.626e-34
|
||||
|
||||
= 224_617.445_991_228
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# infinity
|
||||
= inf # positive infinity
|
||||
= +inf # positive infinity
|
||||
= -inf # negative infinity
|
||||
|
||||
# not a number
|
||||
= nan # actual sNaN/qNaN encoding is implementation-specific
|
||||
= +nan # same as `nan`
|
||||
= -nan # valid, actual encoding is implementation-specific
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
= true
|
||||
= false
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
= 1979-05-27T07:32:00Z
|
||||
= 1979-05-27T00:32:00-07:00
|
||||
= 1979-05-27T00:32:00.999999-07:00
|
||||
= 1979-05-27 07:32:00Z
|
||||
= 1979-05-27T07:32:00
|
||||
= 1979-05-27T00:32:00.999999
|
||||
= 1979-05-27
|
||||
= 07:32:00
|
||||
= 00:32:00.999999
|
||||
|
||||
# lower
|
||||
= 1987-07-05t17:45:00z
|
||||
@@ -0,0 +1,2 @@
|
||||
# trailing .
|
||||
= 1997-09-09T09:09:09.
|
||||
@@ -0,0 +1,2 @@
|
||||
# timezone offset overflow minute
|
||||
= 1985-06-18 17:04:07+12:60
|
||||
Reference in New Issue
Block a user