Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle fields that do not have a value splitter #103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yaauie
Copy link
Contributor

@yaauie yaauie commented Jun 8, 2022

By prepending an optional, non-capturing field splitter to our scanning regexp
we ensure that a valueless key is fully consumed, preventing a multibyte field
splitter from partially leaking into the next key.

Correctly parses out k1 => v1 and k2 => v2 from any of the following
sequences using the field splitter __:

missing__k1=v1__k2=v2
k1=v1__missing__k2=v2
k1=v1__k2=v2__missing

Co-authored-by: Tom Gregory [email protected]

By prepending an optional, non-capturing field splitter to our scanning regexp
we ensure that a valueless key is fully consumed, preventing a multibyte field
splitter from partially leaking into the next key.

Correctly parses out `k1` => `v1` and `k2` => `v2` from any of the following
sequences using the field splitter `__`:

    missing__k1=v1__k2=v2
    k1=v1__missing__k2=v2
    k1=v1__k2=v2__missing

Co-authored-by: Tom Gregory <[email protected]>
@mashhurs
Copy link
Contributor

mashhurs commented Jun 8, 2022

Do we need to version up (and include changelog)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants