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

vscode Even Better TOML: Authors regex pattern for validation of pyproject.toml doesn't match email addresses surrounded by <> #34

Closed
tbradshaw opened this issue Aug 3, 2020 · 2 comments
Labels
bug Something isn't working schema JSON-schema related issues

Comments

@tbradshaw
Copy link

When using Even Better TOML with vscode, I noticed that my author byline wasn't matching.

I had written: authors = ["Travis Bradshaw <travis@tbradshaw.net>"], which created an error that reads "the value doesn't match the given pattern".

I found the regex in the source to perform a cursory check, but after pasting the regex into a couple online validators it didn't seem to parse for them. (I think maybe this is a flavor of regex that the online validators didn't support? The discrepancies appeared to be very minor, but the regex for matching this field is a bit of a whopper and so I didn't investigate further.)

Through just trial and error, I found that "Travis Bradshaw travis@tbradshaw.net" does work, but "Travis Bradshaw travis@tbradshaw.net" does not.

Checking the spec for pyproject.toml, I think that this is in error: https://www.python.org/dev/peps/pep-0621/#authors-maintainers

Thank you for your time,

-- Travis

@tbradshaw tbradshaw changed the title Authors regex pattern for validation of pyproject.toml doesn't match email addresses surrounded by <>? vscode Even Better TOML: Authors regex pattern for validation of pyproject.toml doesn't match email addresses surrounded by <>? Aug 3, 2020
@tbradshaw tbradshaw changed the title vscode Even Better TOML: Authors regex pattern for validation of pyproject.toml doesn't match email addresses surrounded by <>? vscode Even Better TOML: Authors regex pattern for validation of pyproject.toml doesn't match email addresses surrounded by <> Aug 3, 2020
@tamasfe tamasfe added bug Something isn't working enhancement schema JSON-schema related issues and removed enhancement labels Aug 3, 2020
@tamasfe
Copy link
Owner

tamasfe commented Aug 3, 2020

Thanks, it is just an email regex with mandatory whitespace before it, and I apparently forgot to add the <>.
Also currently " some@email.com" will be valid, but it shouldn't be.

These should be small fixes but I don't have any time for this project right now.

A PR would be very welcome if you have some time.

The regex that is releated is here, same one is used for maintainers, thus it is also incorrect.

@tbradshaw
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working schema JSON-schema related issues
Projects
None yet
Development

No branches or pull requests

2 participants