We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The existing dateRegexp allows a T-prefix on a local date.
dateRegexp
T
This should not pass, but it does:
diff --git a/lexer_test.go b/lexer_test.go index 225a52a..af12e9f 100644 --- a/lexer_test.go +++ b/lexer_test.go @@ -350,6 +350,12 @@ func TestKeyEqualDate(t *testing.T) { {Position{1, 7}, tokenDate, "1979-05-27 07:32:00Z"}, {Position{1, 27}, tokenEOF, ""}, }) + testFlow(t, "foo = T07:32:00", []token{ + {Position{1, 1}, tokenKey, "foo"}, + {Position{1, 5}, tokenEqual, "="}, + {Position{1, 7}, tokenLocalDate, "T07:32:00"}, + {Position{1, 16}, tokenEOF, ""}, + }) } func TestFloatEndingWithDot(t *testing.T) {
The text was updated successfully, but these errors were encountered:
Thank you! Definitely not conforming to the spec.
Sorry, something went wrong.
Fix lexer allow T-prefix on local dates
77cd94c
The dateRegex matched localDate with T, we should remove it. Fix pelletier#442
Do not allow T-prefix on local dates (#446)
f9ba082
Fixes #442
Successfully merging a pull request may close this issue.
Describe the Bug
The existing
dateRegexp
allows aT
-prefix on a local date.To Reproduce
This should not pass, but it does:
Versions
The text was updated successfully, but these errors were encountered: