boolean (@NotNull String tagName) { for (int i = myItemsStack.size() - 1; i >= 0; i--) { var item = myItemsStack.get(i); if (item instanceof HtmlTagInfo tagInfo) { if (tagInfo.getNormalizedName().equals(tagName)) { return true; } } else { return false; } } return false; }