private static boolean violateTextRangeRestrictions(@NotNull TextRange elementTextRange, @NotNull TextRange lastParentTextRange) {
    // If the element not in the range of parent or declared lower than called
    return !elementTextRange.contains(lastParentTextRange) && elementTextRange.getEndOffset() > lastParentTextRange.getStartOffset();
  }
private static boolean violateTextRangeRestrictions(@NotNull TextRange elementTextRange, @NotNull TextRange lastParentTextRange)