private static boolean isBlockElement(@NotNull Node node) {
    if (!(node instanceof Element element)) {
      return false;
    }

    return "list".equals(element.tagName()) ||
           ("code".equals(element.tagName()) && "block".equals(element.attr("style"))) ||
           isBr(node);
  }
private static boolean isBlockElement(@NotNull Node node)