splitByEmptyLine function
Implementation
@visibleForTesting
List<List<String>> splitByEmptyLine(List<String> lines) {
final List<List<String>> result = [];
List<String> chunk = <String>[];
for (String line in lines) {
if (line.isEmpty) {
result.add(chunk);
chunk = [];
} else {
chunk.add(line);
}
}
if (chunk.isNotEmpty) {
result.add(chunk);
}
return result;
}