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

[WIP] Don't capitalize characters following multiple forward slashes #17865

Closed
wants to merge 1 commit into from

Conversation

GavinJoyce
Copy link
Member

@GavinJoyce GavinJoyce changed the title [BUGFIX beta] Don't double forward slashes [BUGFIX beta] Don't capitalize characters following multiple forward slashes Apr 5, 2019
@GavinJoyce GavinJoyce changed the title [BUGFIX beta] Don't capitalize characters following multiple forward slashes Don't capitalize characters following multiple forward slashes Apr 5, 2019
@@ -53,7 +53,7 @@ const UNDERSCORE_CACHE = new Cache<string, string>(1000, str =>
.toLowerCase()
);

const STRING_CAPITALIZE_REGEXP = /(^|\/)([a-z\u00C0-\u024F])/g;
const STRING_CAPITALIZE_REGEXP = /(^|(?<!\/)\/(?!\/))([a-z\u00C0-\u024F])/g;
Copy link
Member Author

Choose a reason for hiding this comment

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

@GavinJoyce
Copy link
Member Author

GavinJoyce commented Apr 5, 2019

As there is a merged RFC to deprecate Ember.String, I'm going to close this and work on the deprecation instead.

see emberjs/ember-string#396

@GavinJoyce GavinJoyce closed this Apr 5, 2019
@GavinJoyce GavinJoyce deleted the gj/capitalize branch April 5, 2019 15:20
@GavinJoyce GavinJoyce restored the gj/capitalize branch April 5, 2019 16:22
@GavinJoyce
Copy link
Member Author

Reopening as I learned that capitalize might not be deprecated. I may need to find an alternative method though as lookaheads mightn't be supported by IE11

@GavinJoyce GavinJoyce reopened this Apr 5, 2019
@GavinJoyce GavinJoyce changed the title Don't capitalize characters following multiple forward slashes [WIP] Don't capitalize characters following multiple forward slashes Apr 5, 2019
@GavinJoyce
Copy link
Member Author

Closing again. We can address this with a better community supported capitalize helper in Ember 4.0

@GavinJoyce GavinJoyce closed this Apr 10, 2019
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.

capitalize rules are too aggressive
1 participant