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

Fix valid_name regex for SLexer #1333

Merged
merged 1 commit into from Dec 8, 2019
Merged

Fix valid_name regex for SLexer #1333

merged 1 commit into from Dec 8, 2019

Conversation

CrafterKolyan
Copy link
Contributor

This fixes #1331
All modifications to regex:

  1. Delete 2 useless non-capturing groups
  2. Variables can not start with underscore (_)
  3. Only letters, dot (.) and underscore (_) can go after first dot (.) in name
  4. Name from only one symbol dot (.) is possible

This fixes #1331
All modifications to regex:
1. Delete 2 useless non-capturing groups
2. Variables can not start with underscore (_)
3. Only letters, dot (.) and underscore (_) can go after first dot (.) in name
4. Name from only one symbol dot (.) is possible
Copy link
Member

@birkenfeld birkenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you for the PR!

@birkenfeld birkenfeld merged commit cf88ba3 into pygments:master Dec 8, 2019
@CrafterKolyan CrafterKolyan deleted the fix_r branch December 8, 2019 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong lexing for R (SLexer) in case of "." (dot) as a variable name
2 participants