mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 13:24:27 +01:00
Rename the key_component into a value_component
Co-authored-by: marin <postma.marin@protonmail.com>
This commit is contained in:
parent
6515838d35
commit
9c36e497d9
@ -35,7 +35,7 @@ pub fn parse_value(input: Span) -> IResult<Token> {
|
|||||||
// doubleQuoted = "\"" (word | spaces)* "\""
|
// doubleQuoted = "\"" (word | spaces)* "\""
|
||||||
let double_quoted = take_till(|c: char| c == '"');
|
let double_quoted = take_till(|c: char| c == '"');
|
||||||
// word = (alphanumeric | _ | - | .)+
|
// word = (alphanumeric | _ | - | .)+
|
||||||
let word = take_while1(is_key_component);
|
let word = take_while1(is_value_component);
|
||||||
|
|
||||||
// this parser is only used when an error is encountered and it parse the
|
// this parser is only used when an error is encountered and it parse the
|
||||||
// largest string possible that do not contain any “language” syntax.
|
// largest string possible that do not contain any “language” syntax.
|
||||||
@ -65,7 +65,7 @@ pub fn parse_value(input: Span) -> IResult<Token> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_key_component(c: char) -> bool {
|
fn is_value_component(c: char) -> bool {
|
||||||
c.is_alphanumeric() || ['_', '-', '.'].contains(&c)
|
c.is_alphanumeric() || ['_', '-', '.'].contains(&c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user