List<String> (ListIterator<String> iterator) { ArrayList<String> result = new ArrayList<>(); while (iterator.hasNext()) { final String line = iterator.next(); if (!line.startsWith(" ") && !line.startsWith("+ ") && !line.startsWith("- ") && !line.startsWith("! ") && !line.startsWith(NO_NEWLINE_SIGNATURE)) { iterator.previous(); break; } result.add(line); } return result; }