Skip to content

Commit

Permalink
fix(model): Trim white space in rate record values
Browse files Browse the repository at this point in the history
  • Loading branch information
realth000 committed Dec 6, 2023
1 parent 3c8ed56 commit 21ead48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/models/rate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Rate {
final detailUrl = infoNode?.firstHref();
final attrList = rateHeaders
.skip(1)
.map((e) => e.querySelector('i')?.firstEndDeepText())
.map((e) => e.querySelector('i')?.firstEndDeepText()?.trim())
.whereType<String>()
.toList();

Expand Down Expand Up @@ -126,7 +126,7 @@ class Rate {
userNode?.querySelector('a:nth-child(1) > img')?.imageUrl();
final name = userNode?.querySelector('a:nth-child(2)')?.firstEndDeepText();
final attrValueList =
tdList.skip(1).map((e) => e.firstEndDeepText() ?? '').toList();
tdList.skip(1).map((e) => e.firstEndDeepText()?.trim() ?? '').toList();

if (url == null || name == null) {
return null;
Expand Down

0 comments on commit 21ead48

Please sign in to comment.