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

Fixed string capitalize for accented characters #14764

Merged
merged 1 commit into from
Jul 12, 2017

Conversation

IgorKvasn
Copy link
Contributor

String capitalize function did not work properly, when first character is accented (e.g. ščťžý)

@locks locks requested a review from rwjblue December 29, 2016 13:01
@@ -60,7 +60,7 @@ const UNDERSCORE_CACHE = new Cache(1000, function(str) {
replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase();
});

const STRING_CAPITALIZE_REGEXP = (/(^|\/)([a-z])/g);
const STRING_CAPITALIZE_REGEXP = (/(^|\/)([a-zA-Z\u00C0-\u024F])/g);
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand why A-Z was added here, can you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right :) I'll remove A-Z from the regex

@locks locks merged commit 0a42565 into emberjs:master Jul 12, 2017
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.

3 participants