Skip to content

Commit

Permalink
Merge pull request #250 from vware/main
Browse files Browse the repository at this point in the history
fix: trim lines read after decoding
  • Loading branch information
robert-virkus authored Jan 2, 2025
2 parents 0df187c + 468c2b7 commit c004e3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/private/util/uint8_list_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Uint8ListReader {
return null;
}
final data = _builder.takeFirst(pos + 1);
final line = _utf8decoder.convert(data, 0, pos - 1);
final line = _utf8decoder.convert(data, 0, pos - 1).trimLeft();

return line;
}
Expand All @@ -42,7 +42,7 @@ class Uint8ListReader {
return null;
}
final data = _builder.takeFirst(pos + 1);
final text = _utf8decoder.convert(data);
final text = _utf8decoder.convert(data).trimLeft();

return text.split('\r\n')..removeLast();
}
Expand Down

0 comments on commit c004e3e

Please sign in to comment.