boolean (PsiElement lastChild) { //strange approach, but it's universal for xml and html return lastChild != null && lastChild.getNode().getElementType() != XmlTokenType.XML_TAG_END && lastChild.getNode().getElementType() != XmlTokenType.XML_EMPTY_ELEMENT_END; }