@@ -140,6 +140,44 @@ describe('block collections', () => {
140
140
` )
141
141
expect ( doc . errors ) . toMatchObject ( [ ] )
142
142
} )
143
+
144
+ test ( 'key after long comment on block map (eemeli/yaml#413)' , ( ) => {
145
+ const doc = YAML . parseDocument ( source `
146
+ one:
147
+ sub: a
148
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
149
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
150
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
151
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
152
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
153
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
154
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
155
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
156
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
157
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
158
+ two: b
159
+ ` )
160
+ expect ( doc . errors ) . toMatchObject ( [ ] )
161
+ } )
162
+
163
+ test ( 'key after long comment on block seq (eemeli/yaml#413)' , ( ) => {
164
+ const doc = YAML . parseDocument ( source `
165
+ one:
166
+ - a
167
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
168
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
169
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
170
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
171
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
172
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
173
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
174
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
175
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
176
+ # large block of text, large block of text, large block of text, large block of text, large block of text,
177
+ two: b
178
+ ` )
179
+ expect ( doc . errors ) . toMatchObject ( [ ] )
180
+ } )
143
181
} )
144
182
145
183
describe ( 'flow collections' , ( ) => {
0 commit comments