private static @NotNull TextRange appendEntireLine(@NotNull StringBuilder sb, @NotNull String line) {
    int startOffset = sb.length();
    sb.append(line);
    if (!line.endsWith("\n")) {
      sb.append("\n");
    }
    int endOffset = sb.length();
    return TextRange.create(startOffset, endOffset);
  }
private static @NotNull TextRange appendEntireLine(@NotNull StringBuilder sb, @NotNull String line)