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 @@ -333,17 +333,16 @@ class Parser
333333 if indent is newIndent
334334 removeComments = not removeCommentsPattern .test @currentLine
335335
336- if isItUnindentedCollection and not @ isStringUnIndentedCollectionItem (@currentLine ) and indent is newIndent
337- @ moveToPreviousLine ()
338- break
336+ if removeComments and @ isCurrentLineComment ()
337+ continue
339338
340339 if @ isCurrentLineBlank ()
341340 data .push @currentLine [newIndent.. ]
342341 continue
343342
344- if removeComments and @ isCurrentLineComment ()
345- if indent is newIndent
346- continue
343+ if isItUnindentedCollection and not @ isStringUnIndentedCollectionItem ( @currentLine ) and indent is newIndent
344+ @ moveToPreviousLine ()
345+ break
347346
348347 if indent >= newIndent
349348 data .push @currentLine [newIndent.. ]
You can’t perform that action at this time.
0 commit comments