boolean (@NotNull List<SubstitutionChunk> substitutions, @NotNull TextRange range) { final List<TextRange> ranges = substitutionsToRanges(substitutions); for (TextRange r : ranges) { if (range.contains(r)) { return true; } } return false; }