Skip to content

Commit

Permalink
queryparser: ignore empty tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonish committed Jul 12, 2024
1 parent 0b999b1 commit dd92d9a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/queryparser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ pub(crate) fn parse(

negated = false;
} else {
elements.push(QueryElement {
negated,
value: QueryValue::String(token),
});
let token = token.trim();
if !token.is_empty() {
elements.push(QueryElement {
negated,
value: QueryValue::String(token.to_string()),
});
}
negated = false;
}
}
Expand Down

0 comments on commit dd92d9a

Please sign in to comment.