fix(parser): Ensure we get full base64

We greedily matched separators, including ones that might be part of
base64.  This impacts the length calculation, so we want as much as
possible.
This commit is contained in:
Ed Page 2021-06-29 13:55:46 -05:00
parent 6915d85c0b
commit b673b81146

View file

@ -180,13 +180,13 @@ mod parser {
<T as nom::InputIter>::Item: AsChar + Copy, <T as nom::InputIter>::Item: AsChar + Copy,
{ {
take_many0(alt(( take_many0(alt((
sep1,
terminated(uuid_literal, sep1), terminated(uuid_literal, sep1),
terminated(hash_literal, sep1), terminated(hash_literal, sep1),
terminated(hex_literal, sep1), terminated(hex_literal, sep1),
terminated(dec_literal, sep1), terminated(dec_literal, sep1),
terminated(base64_literal, sep1), terminated(base64_literal, sep1),
terminated(email_literal, sep1), terminated(email_literal, sep1),
sep1,
)))(input) )))(input)
} }