Index: components/query_parser/snippet.cc |
diff --git a/components/query_parser/snippet.cc b/components/query_parser/snippet.cc |
index e393d60ff089ea6280eb555fb4a74078061c4393..2276e4acc772eb2d2b9986799fff7cf1d2e92e1a 100644 |
--- a/components/query_parser/snippet.cc |
+++ b/components/query_parser/snippet.cc |
@@ -167,8 +167,8 @@ void Snippet::ExtractMatchPositions(const std::string& offsets_str, |
DCHECK(match_positions); |
if (offsets_str.empty()) |
return; |
- std::vector<std::string> offsets; |
- base::SplitString(offsets_str, ' ', &offsets); |
+ std::vector<std::string> offsets = base::SplitString( |
+ offsets_str, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
// SQLite offsets are sets of four integers: |
// column, query term, match offset, match length |
// Matches within a string are marked by (start, end) pairs. |