tanos-jlpt: remove flatten from xml stream
All checks were successful
Build and test / build (push) Successful in 13m41s
All checks were successful
Build and test / build (push) Successful in 13m41s
This was earlier used to compensate for a double nesting bug. This has been fixed in the latest version of the xml package.
This commit is contained in:
@@ -10,11 +10,12 @@ Future<List<JLPTRankedWord>> parseJLPTRankedWords(
|
||||
) async {
|
||||
final List<JLPTRankedWord> result = [];
|
||||
|
||||
final codec = CsvCodec(
|
||||
final codec = Csv(
|
||||
fieldDelimiter: ',',
|
||||
lineDelimiter: '\n',
|
||||
quoteMode: QuoteMode.strings,
|
||||
escapeCharacter: '\\',
|
||||
parseHeaders: false,
|
||||
);
|
||||
|
||||
for (final entry in files.entries) {
|
||||
@@ -29,7 +30,6 @@ Future<List<JLPTRankedWord>> parseJLPTRankedWords(
|
||||
.openRead()
|
||||
.transform(utf8.decoder)
|
||||
.transform(codec.decoder)
|
||||
.flatten()
|
||||
.map((row) {
|
||||
if (row.length != 3) {
|
||||
throw Exception('Invalid line in $jlptLevel: $row');
|
||||
|
||||
Reference in New Issue
Block a user