void (@NotNull final PsiElement element) { if (element.getNextSibling() != null) { deleteElementsOfType(element::getNextSibling, BLANK_LINE_ELEMENTS); deleteElementsOfType(element::getNextSibling, YAMLElementTypes.SPACE_ELEMENTS); } else { deleteElementsOfType(element::getPrevSibling, YAMLElementTypes.SPACE_ELEMENTS); } }