Block (@NotNull YAMLFormattingContext context, @NotNull ASTNode node) { IElementType nodeType = PsiUtilCore.getElementType(node); if (YAMLElementTypes.BLOCK_SCALAR_ITEMS.contains(nodeType)) { ASTNode blockScalarNode = node.getTreeParent(); assert (blockScalarNode.getPsi() instanceof YAMLBlockScalarImpl); YAMLBlockScalarImpl blockScalarImpl = (YAMLBlockScalarImpl)blockScalarNode.getPsi(); if (blockScalarImpl.getNthContentTypeChild(0) != node) { // node is not block scalar header return YAMLBlockScalarItemBlock.createBlockScalarItem(context, node); } } assert nodeType != YAMLElementTypes.SEQUENCE : "Sequence should be inlined!"; assert nodeType != YAMLElementTypes.MAPPING : "Mapping should be inlined!"; assert nodeType != YAMLElementTypes.DOCUMENT : "Document should be inlined!"; return new YAMLFormattingBlock(context, node); }