Skip to content

Commit

Permalink
Correct typo in missing_whitespace_between_adjacent_strings (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
srawlins authored Jun 30, 2021
1 parent 869904f commit 0f0540b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extension on StringLiteral {
return self.value.startsWithWhitespace;
} else if (self is StringInterpolation) {
var first = self.elements.first as InterpolationString;
return first.value.isEmpty || first.value.endsWithWhitespace;
return first.value.isEmpty || first.value.startsWithWhitespace;
}
throw ArgumentError(
'Expected SimpleStringLiteral or StringInterpolation, but got '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ f(o) {
'b');
f('a' // OK
'$o b');
f("a $o b" // OK
" c$o");
}

void matches(String value) {}

0 comments on commit 0f0540b

Please sign in to comment.