boolean (@NotNull TextRange parentRange, @NotNull TextRange childRange, @NotNull FormattingDocumentModel model) { if (childRange.getStartOffset() < parentRange.getStartOffset()) { assertInvalidRanges( childRange.getStartOffset(), parentRange.getStartOffset(), model, "child block start is less than parent block start" ); return false; } if (childRange.getEndOffset() > parentRange.getEndOffset()) { assertInvalidRanges( childRange.getStartOffset(), parentRange.getStartOffset(), model, "child block end is after parent block end" ); return false; } return true; }