private static boolean isNewline(@NotNull CharSequence text, @NotNull TextRange range) {
        return range.getLength() == 1 && text.charAt(range.getStartOffset()) == '\n';
      }
private static boolean isNewline(@NotNull CharSequence text, @NotNull TextRange range)