File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -334,17 +334,16 @@ class Parser
334334 if indent is newIndent
335335 removeComments = not removeCommentsPattern .test @currentLine
336336
337- if isItUnindentedCollection and not @ isStringUnIndentedCollectionItem (@currentLine ) and indent is newIndent
338- @ moveToPreviousLine ()
339- break
337+ if removeComments and @ isCurrentLineComment ()
338+ continue
340339
341340 if @ isCurrentLineBlank ()
342341 data .push @currentLine [newIndent.. ]
343342 continue
344343
345- if removeComments and @ isCurrentLineComment ()
346- if indent is newIndent
347- continue
344+ if isItUnindentedCollection and not @ isStringUnIndentedCollectionItem ( @currentLine ) and indent is newIndent
345+ @ moveToPreviousLine ()
346+ break
348347
349348 if indent >= newIndent
350349 data .push @currentLine [newIndent.. ]
You can’t perform that action at this time.
0 commit comments