Consider ordering of tag-value pairs; ignore unknown tags#6
Closed
Consider ordering of tag-value pairs; ignore unknown tags#6
Conversation
Contributor
|
So we need to move back to the Array of Hashes model? For unknown tags, we could add a catch rule. Not sure how we'd safely recover from syntax errors within tags. Maybe we'd have to split by ';' first, and parse each tag individually? |
Contributor
Author
|
I'm not sure. I'm heads down on some other stuff for the rest of the week. I'll have another look early next week. |
Contributor
Author
|
I've reached out to the parslet community on the mailing list for ideas. |
Contributor
Author
|
Possible example: rule(:a) { a_properly_formed_a | consume_anything_upto_the_next_tag_start }
rule(:consume_anything_upto_the_next_tag_start) { (start_tag_token.absent? >> any).repeat(1) } |
Contributor
|
Ah clever. Instead of |
Contributor
|
Closing/Recreating this now that we have the Alexa Top 500 gauntlet tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the spec:
We are currently enforcing the order of all of the tags (not just v and p). We also blow up on unknown tags.
I've added a failing test with yahoo's dmarc record as an example of the
pcttag being out of order.