Changeset View
Changeset View
Standalone View
Standalone View
autotests/folding/test.yaml.fold
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | |||||
73 | : <beginfold id='1'>[</beginfold id='1'> 2018-08-11, 2016-01-01 <endfold id='1'>]</endfold id='1'> | 73 | : <beginfold id='1'>[</beginfold id='1'> 2018-08-11, 2016-01-01 <endfold id='1'>]</endfold id='1'> | ||
74 | 74 | | |||
75 | # Literal/Folded Style | 75 | # Literal/Folded Style | ||
76 | 76 | | |||
77 | --- <beginfold id='4'>|</beginfold id='4'> | 77 | --- <beginfold id='4'>|</beginfold id='4'> | ||
78 | \//||\/|| | 78 | \//||\/|| | ||
79 | // || ||__ | 79 | // || ||__ | ||
80 | 80 | | |||
81 | <endfold id='4'>-</endfold id='4'>-- <beginfold id='4'>></beginfold id='4'> | 81 | <endfold id='4'></endfold id='4'>--- <beginfold id='4'>></beginfold id='4'> | ||
82 | Mark McGwire's | 82 | Mark McGwire's | ||
83 | year was crippled | 83 | year was crippled | ||
84 | by a knee injury. | 84 | by a knee injury. | ||
85 | 85 | | |||
86 | <endfold id='4'>?</endfold id='4'> <beginfold id='4'>|</beginfold id='4'> | 86 | <endfold id='4'></endfold id='4'>? <beginfold id='4'>|</beginfold id='4'> | ||
87 | This is a key | 87 | This is a key | ||
88 | that has multiple lines | 88 | that has multiple lines | ||
89 | <endfold id='4'>:</endfold id='4'> <beginfold id='4'>|</beginfold id='4'> | 89 | <endfold id='4'></endfold id='4'>: <beginfold id='4'>|</beginfold id='4'> | ||
90 | and this is it's literal value | 90 | and this is it's literal value | ||
91 | 91 | | |||
92 | <endfold id='4'>#</endfold id='4'> Capture the indentation of the Key. The "-" and "?" operators | 92 | <endfold id='4'></endfold id='4'># Capture the indentation of the Key. The "-" and "?" operators | ||
93 | # are considered as part of the indentation: | 93 | # are considered as part of the indentation: | ||
94 | key1: | 94 | key1: | ||
95 | key2: !!hello <beginfold id='4'>|</beginfold id='4'> | 95 | key2: !!hello <beginfold id='4'>|</beginfold id='4'> | ||
96 | literal: " text" # [ ] | 96 | literal: " text" # [ ] | ||
97 | 97 | | |||
98 | # literal { } | 98 | # literal { } | ||
99 | <endfold id='4'> k</endfold id='4'>ey3: <beginfold id='4'>|+</beginfold id='4'> | 99 | <endfold id='4'></endfold id='4'> key3: <beginfold id='4'>|+</beginfold id='4'> | ||
100 | literal: 'text' | 100 | literal: 'text' | ||
101 | <endfold id='4'> n</endfold id='4'>o-literal: <beginfold id='3'>"</beginfold id='3'> text<endfold id='3'>"</endfold id='3'> | 101 | <endfold id='4'></endfold id='4'> no-literal: <beginfold id='3'>"</beginfold id='3'> text<endfold id='3'>"</endfold id='3'> | ||
102 | #comment | 102 | #comment | ||
103 | 103 | | |||
104 | ? key: <beginfold id='4'>|-</beginfold id='4'> | 104 | ? key: <beginfold id='4'>|-</beginfold id='4'> | ||
105 | literal: "text" | 105 | literal: "text" | ||
106 | <endfold id='4'> n</endfold id='4'>o-literal: <beginfold id='3'>"</beginfold id='3'>text<endfold id='3'>"</endfold id='3'> | 106 | <endfold id='4'></endfold id='4'> no-literal: <beginfold id='3'>"</beginfold id='3'>text<endfold id='3'>"</endfold id='3'> | ||
107 | - item1 | 107 | - item1 | ||
108 | - item2 | 108 | - item2 | ||
109 | - - - key: <beginfold id='4'>>-</beginfold id='4'> | 109 | - - - key: <beginfold id='4'>>-</beginfold id='4'> | ||
110 | "literal text" # [ ] | 110 | "literal text" # [ ] | ||
111 | 111 | | |||
112 | 'literal block' | 112 | 'literal block' | ||
113 | <endfold id='4'> n</endfold id='4'>o-literal: 12 | 113 | <endfold id='4'></endfold id='4'> no-literal: 12 | ||
114 | 114 | | |||
115 | ? - - - - ? key: <beginfold id='4'>|</beginfold id='4'> | 115 | ? - - - - ? key: <beginfold id='4'>|</beginfold id='4'> | ||
116 | literal: [ ] | 116 | literal: [ ] | ||
117 | <endfold id='4'> n</endfold id='4'>o-literal: <beginfold id='1'>[</beginfold id='1'> <endfold id='1'>]</endfold id='1'> | 117 | <endfold id='4'></endfold id='4'> no-literal: <beginfold id='1'>[</beginfold id='1'> <endfold id='1'>]</endfold id='1'> | ||
118 | 118 | | |||
119 | # Capture the indentation of the literal/folded operator: | 119 | # Capture the indentation of the literal/folded operator: | ||
120 | <beginfold id='4'>|-</beginfold id='4'> | 120 | <beginfold id='4'>|-</beginfold id='4'> | ||
121 | literal: "text" | 121 | literal: "text" | ||
122 | 122 | | |||
123 | <endfold id='4'>!</endfold id='4'>!binary <beginfold id='4'>|</beginfold id='4'> | 123 | <endfold id='4'></endfold id='4'>!!binary <beginfold id='4'>|</beginfold id='4'> | ||
124 | R0lGODlhDAAMAIQAAP//9/X | 124 | R0lGODlhDAAMAIQAAP//9/X | ||
125 | 17unp5WZmZgAAAOfn515eXv | 125 | 17unp5WZmZgAAAOfn515eXv | ||
126 | Pz7Y6OjuDg4J+fn5OTk6enp | 126 | Pz7Y6OjuDg4J+fn5OTk6enp | ||
127 | 56enmleECcgggoBADs= | 127 | 56enmleECcgggoBADs= | ||
128 | 128 | | |||
129 | <endfold id='4'>k</endfold id='4'>ey1: | 129 | <endfold id='4'></endfold id='4'>key1: | ||
130 | key2: | 130 | key2: | ||
131 | <beginfold id='4'> |</beginfold id='4'> | 131 | <beginfold id='4'> |</beginfold id='4'> | ||
132 | literal: "text" | 132 | literal: "text" | ||
133 | <endfold id='4'> k</endfold id='4'>ey3: | 133 | <endfold id='4'></endfold id='4'> key3: | ||
134 | !!str <beginfold id='4'>|</beginfold id='4'> | 134 | !!str <beginfold id='4'>|</beginfold id='4'> | ||
135 | literal: "text" | 135 | literal: "text" | ||
136 | #literal | 136 | #literal | ||
137 | 137 | | |||
138 | <endfold id='4'>#</endfold id='4'> Capture the indentation of the operators "-" or "?": | 138 | <endfold id='4'></endfold id='4'># Capture the indentation of the operators "-" or "?": | ||
139 | ? - - - !!hello <beginfold id='4'>|+</beginfold id='4'> | 139 | ? - - - !!hello <beginfold id='4'>|+</beginfold id='4'> | ||
140 | literal: "sdfsd" # [ ] | 140 | literal: "sdfsd" # [ ] | ||
141 | <endfold id='4'> n</endfold id='4'>o-literal: <beginfold id='3'>"</beginfold id='3'>sdfsd<endfold id='3'>"</endfold id='3'> # [ ] | 141 | <endfold id='4'></endfold id='4'> no-literal: <beginfold id='3'>"</beginfold id='3'>sdfsd<endfold id='3'>"</endfold id='3'> # [ ] | ||
142 | 142 | | |||
143 | - - - - <beginfold id='4'>>-</beginfold id='4'> | 143 | - - - - <beginfold id='4'>>-</beginfold id='4'> | ||
144 | literal: "text" | 144 | literal: "text" | ||
145 | #literal | 145 | #literal | ||
146 | <endfold id='4'> n</endfold id='4'>o-literal: <beginfold id='3'>"</beginfold id='3'>text<endfold id='3'>"</endfold id='3'> | 146 | <endfold id='4'></endfold id='4'> no-literal: <beginfold id='3'>"</beginfold id='3'>text<endfold id='3'>"</endfold id='3'> | ||
147 | 147 | | |||
148 | # This implementation of literal blocks has a limitation: | 148 | # This implementation of literal blocks has a limitation: | ||
149 | # it only supports 6 dashes at most. | 149 | # it only supports 6 dashes at most. | ||
150 | - - - - - - - key: | | 150 | - - - - - - - key: | | ||
151 | literal? <beginfold id='3'>"</beginfold id='3'>dfsf<endfold id='3'>"</endfold id='3'> | 151 | literal? <beginfold id='3'>"</beginfold id='3'>dfsf<endfold id='3'>"</endfold id='3'> |