File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ export class ParseContext {
135
135
const noIndicatorAsIndent =
136
136
parent . type === Type . SEQ_ITEM && parent . context . atLineStart
137
137
if (
138
+ src [ inEnd ] !== '#' &&
138
139
! Node . nextNodeIsIndented ( src [ inEnd ] , indentDiff , ! noIndicatorAsIndent )
139
140
)
140
141
break
Original file line number Diff line number Diff line change @@ -488,6 +488,20 @@ key1: &default
488
488
# This key ...
489
489
subkey1: value1
490
490
491
+ key2:
492
+ <<: *default\n`
493
+ expect ( YAML . parse ( src , { merge : true } ) ) . toMatchObject ( {
494
+ key1 : { subkey1 : 'value1' } ,
495
+ key2 : { subkey1 : 'value1' }
496
+ } )
497
+ } )
498
+
499
+ test ( 'reported 3' , ( ) => {
500
+ const src = `
501
+ key1: &default
502
+ # This key ...
503
+ subkey1: value1
504
+
491
505
key2:
492
506
<<: *default\n`
493
507
expect ( YAML . parse ( src , { merge : true } ) ) . toMatchObject ( {
You can’t perform that action at this time.
0 commit comments