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

Made label text for camel case or dash separated field names format nicely #89

Merged
merged 2 commits into from
Jan 15, 2014

Conversation

timjrobinson
Copy link
Contributor

Made is so if a user uses camel case or dash separated field names the label text adds spaces in between the words.

I made the replace method for fixing camel case field names use a function so that the first letter of the second word is lower cased to be consistent with the other use cases.

@@ -14,7 +14,7 @@ var forms = require('./forms'),
return copy;
}, {});
},
underscoreRegExp = /_/g;
underscoreRegExp = /[_-]/g;
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's rename this variable since it's not just checking underscores

ljharb added a commit that referenced this pull request Jan 15, 2014
Made label text for camel case or dash separated field names format nicely
@ljharb ljharb merged commit e9b5fbc into caolan:master Jan 15, 2014
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