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

Properly handle attribute names with underscores #113

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

nicks
Copy link
Contributor

@nicks nicks commented Feb 8, 2017

Hello @kellyellis, @kylewm,

Please review the following commits I made in branch 'nicks/attributename'.

ca5d2a0 (2017-02-08 14:49:47 -0500)
Properly handle attribute names with underscores

R=@kellyellis
R=@kylewm

@nicks nicks force-pushed the nicks/attributename branch 2 times, most recently from b73443a to 193f777 Compare February 8, 2017 20:35
Copy link
Contributor

@kylewm kylewm left a comment

Choose a reason for hiding this comment

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

LG, but i shudder to think why we need this 😛

lib/typeUtil.js Outdated
// If this is just a reserved word, use # + word
if (VALID_ATTR_RE.test(key)) {
return '#' + key
}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe split this into isReservedWord, isValidAttributeName, getReservedWordAlias, getInvalidNameAlias?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh i like that idea better, done

@nicks nicks merged commit daa398e into master Feb 8, 2017
@nicks nicks deleted the nicks/attributename branch February 8, 2017 21:16
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