(state, parentIndent, nodeContext, allowToSeek, allowCompact)
| 12317 | } |
| 12318 | |
| 12319 | function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { |
| 12320 | var allowBlockStyles, |
| 12321 | allowBlockScalars, |
| 12322 | allowBlockCollections, |
| 12323 | indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent |
| 12324 | atNewLine = false, |
| 12325 | hasContent = false, |
| 12326 | typeIndex, |
| 12327 | typeQuantity, |
| 12328 | type, |
| 12329 | flowIndent, |
| 12330 | blockIndent; |
| 12331 | |
| 12332 | if (state.listener !== null) { |
| 12333 | state.listener('open', state); |
| 12334 | } |
| 12335 | |
| 12336 | state.tag = null; |
| 12337 | state.anchor = null; |
| 12338 | state.kind = null; |
| 12339 | state.result = null; |
| 12340 | |
| 12341 | allowBlockStyles = allowBlockScalars = allowBlockCollections = |
| 12342 | CONTEXT_BLOCK_OUT === nodeContext || |
| 12343 | CONTEXT_BLOCK_IN === nodeContext; |
| 12344 | |
| 12345 | if (allowToSeek) { |
| 12346 | if (skipSeparationSpace(state, true, -1)) { |
| 12347 | atNewLine = true; |
| 12348 | |
| 12349 | if (state.lineIndent > parentIndent) { |
| 12350 | indentStatus = 1; |
| 12351 | } else if (state.lineIndent === parentIndent) { |
| 12352 | indentStatus = 0; |
| 12353 | } else if (state.lineIndent < parentIndent) { |
| 12354 | indentStatus = -1; |
| 12355 | } |
| 12356 | } |
| 12357 | } |
| 12358 | |
| 12359 | if (indentStatus === 1) { |
| 12360 | while (readTagProperty(state) || readAnchorProperty(state)) { |
| 12361 | if (skipSeparationSpace(state, true, -1)) { |
| 12362 | atNewLine = true; |
| 12363 | allowBlockCollections = allowBlockStyles; |
| 12364 | |
| 12365 | if (state.lineIndent > parentIndent) { |
| 12366 | indentStatus = 1; |
| 12367 | } else if (state.lineIndent === parentIndent) { |
| 12368 | indentStatus = 0; |
| 12369 | } else if (state.lineIndent < parentIndent) { |
| 12370 | indentStatus = -1; |
| 12371 | } |
| 12372 | } else { |
| 12373 | allowBlockCollections = false; |
| 12374 | } |
| 12375 | } |
| 12376 | } |
no test coverage detected