File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,12 @@ function markToString(
181181 return where ;
182182}
183183
184+ function getIndentStatus ( lineIndent : number , parentIndent : number ) {
185+ if ( lineIndent > parentIndent ) return 1 ;
186+ if ( lineIndent < parentIndent ) return - 1 ;
187+ return 0 ;
188+ }
189+
184190export class LoaderState {
185191 input : string ;
186192 length : number ;
@@ -1478,14 +1484,7 @@ export class LoaderState {
14781484 if ( allowToSeek ) {
14791485 if ( this . skipSeparationSpace ( true , - 1 ) ) {
14801486 atNewLine = true ;
1481-
1482- if ( this . lineIndent > parentIndent ) {
1483- indentStatus = 1 ;
1484- } else if ( this . lineIndent === parentIndent ) {
1485- indentStatus = 0 ;
1486- } else if ( this . lineIndent < parentIndent ) {
1487- indentStatus = - 1 ;
1488- }
1487+ indentStatus = getIndentStatus ( this . lineIndent , parentIndent ) ;
14891488 }
14901489 }
14911490
@@ -1494,14 +1493,7 @@ export class LoaderState {
14941493 if ( this . skipSeparationSpace ( true , - 1 ) ) {
14951494 atNewLine = true ;
14961495 allowBlockCollections = allowBlockStyles ;
1497-
1498- if ( this . lineIndent > parentIndent ) {
1499- indentStatus = 1 ;
1500- } else if ( this . lineIndent === parentIndent ) {
1501- indentStatus = 0 ;
1502- } else if ( this . lineIndent < parentIndent ) {
1503- indentStatus = - 1 ;
1504- }
1496+ indentStatus = getIndentStatus ( this . lineIndent , parentIndent ) ;
15051497 } else {
15061498 allowBlockCollections = false ;
15071499 }
You can’t perform that action at this time.
0 commit comments