Skip to content

Forcing class text to be a keyword #436

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

Merged
merged 1 commit into from
May 18, 2016

Conversation

amadeus
Copy link
Collaborator

@amadeus amadeus commented May 18, 2016

This class regex will match if the text class is contained within a larger variable name, and therefore is broken.

I.E. In a definition for className, class will match as jsClassDefinition which is bad.

This P.R. fixes that by forcing class to be a keyword.

This class regex will match if the text class is contained within a
larger variable name, and therefore is broken.
@amadeus
Copy link
Collaborator Author

amadeus commented May 18, 2016

This is a pretty bad bug and the fix is pretty simplistic. Any concerns against merging this? Would like to get it in, ASAP.

@bounceme
Copy link
Collaborator

bounceme commented May 18, 2016

I am fine with it, maybe specify whitespace instead of word boundaries though, i don't really know the class syntax

@amadeus
Copy link
Collaborator Author

amadeus commented May 18, 2016

Unfortunately that isn't viable, since class{} is a valid class definition and don't want to break that.

@bounceme
Copy link
Collaborator

yeah, word boundary is enough then

@amadeus amadeus merged commit 2767155 into pangloss:develop May 18, 2016
@amadeus amadeus deleted the fix-class-definitions branch May 18, 2016 05:19
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.

2 participants