Skip to content

Commit

Permalink
Fix RFC 2396 (#39)
Browse files Browse the repository at this point in the history
Due to a very weird and unexplainable bug in the operating system, an
underscore (`_`) has been copy/pasted as a dash (`-`) in RFC 2396,
leading to an incorrect regular expression.

In this patch, we fix this, and re-generate the test data accordingly.
  • Loading branch information
mristin authored Oct 18, 2024
1 parent fef7491 commit 8d17547
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test_data/nested-python/rfc2396/expected.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alphanum = '[a-zA-Z0-9]'
mark = "[\\-\\-.!~*'()]"
mark = "[\\-_.!~*'()]"
unreserved = f'({alphanum}|{mark})'
hex = (
'([0-9]|[aA]|[bB]|[cC]|[dD]|[eE]|[fF]|[aA]|[bB]|[cC]|[dD]|[e'
Expand Down
2 changes: 1 addition & 1 deletion test_data/nested-python/rfc2396/grammar.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" /

unreserved = alphanum / mark

mark = "-" / "-" / "." / "!" / "~" / "*" / "'" / "(" / ")"
mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"

escaped = "%" hex hex

Expand Down

0 comments on commit 8d17547

Please sign in to comment.