private static int findLineSuffixLength(@NotNull String line, boolean isLastLine) {
      if (isLastLine) return 0;
      int lastIdx = line.length() - 1;
      for (int i = lastIdx; i >= 0; i--) if (!Character.isWhitespace(line.charAt(i))) return lastIdx - i;
      return 0;
    }
private static int findLineSuffixLength(@NotNull String line, boolean isLastLine)