more edge case handling

This commit is contained in:
Robin Appelman 2023-03-16 21:44:41 +01:00
commit f1213a5664
5 changed files with 15 additions and 9 deletions

View file

@ -138,7 +138,8 @@ impl<'a> Iterator for ParamIter<'a> {
fn param_pair_parse(input: &str) -> IResult<'_, (&str, &str)> {
let (input, open_tag) = skip_matches(input, b'(');
let (key, input) = split_once(input, b' ', 2)?;
let (key, input) = split_once(input, b' ', 1)?;
let input = skip(input, 1)?;
let (value, input) = split_once(input, b'"', 1)?;
let input = if open_tag { skip(input, 1)? } else { input };