private static String adjustListItems(List<String> lines, int indent) {
    String firstLine = lines.get(0).substring(YAMLTextUtil.getStartIndentSize(lines.get(0)));
    // if we are pasting a list of sequence items into a sequence,
    //  there is a high probability that we are inlining them into that sequence, so do that
    String firstLineAdjusted = ContainerUtil.and(lines, s -> s.trim().startsWith("-"))
                               ? StringUtil.trimLeading(StringUtil.trimStart(firstLine, "-")) : firstLine;
    return StreamEx.of(lines)
      .skip(1)
      .map(line -> {
        // remove common indent and add needed indent
        if (isEmptyLine(line)) {
          // do not indent empty lines at all
          return "";
        }
        else if (line.trim().startsWith("-")) {
          return StringUtil.repeatSymbol(' ', indent) + StringUtil.trimLeading(line);
        }
        else {
          return StringUtil.repeatSymbol(' ', indent) + "- " + StringUtil.trimLeading(line);
        }
      })
      .prepend(firstLineAdjusted)
      .reduce((left, right) -> left + "\n" + right)
      .orElse("");
  }
private static String adjustListItems(List<String> lines, int indent)