Skip to content

Commit

Permalink
fix(k8s/log): Use multispace1 to split query in the filter::parser::s…
Browse files Browse the repository at this point in the history
…plit_attributes.
  • Loading branch information
sarub0b0 committed Nov 21, 2023
1 parent cc07280 commit 94d4639
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/event/kubernetes/pod/filter/parser.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use nom::{
branch::alt,
bytes::complete::{escaped, is_not, tag},
character::complete::{alphanumeric1, anychar, char, multispace0, space1},
character::complete::{alphanumeric1, anychar, char, multispace0, multispace1},
combinator::{all_consuming, recognize},
error::{ContextError, ParseError},
multi::{many1_count, separated_list0},
Expand Down Expand Up @@ -262,8 +262,11 @@ fn attribute<'a, E: ParseError<&'a str> + ContextError<&'a str>>(
fn split_attributes<'a, E: ParseError<&'a str> + ContextError<&'a str>>(
s: &'a str,
) -> IResult<&'a str, Vec<FilterAttribute>, E> {
let (remaining, value) =
delimited(multispace0, separated_list0(space1, attribute), multispace0)(s)?;
let (remaining, value) = delimited(
multispace0,
separated_list0(multispace1, attribute),
multispace0,
)(s)?;

Ok((remaining, value))
}
Expand Down

0 comments on commit 94d4639

Please sign in to comment.