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

Capitalise operation not working #101

Closed
neocotic opened this issue May 14, 2012 · 2 comments
Closed

Capitalise operation not working #101

neocotic opened this issue May 14, 2012 · 2 comments
Assignees
Labels
bug
Milestone

Comments

@neocotic
Copy link
Member

@neocotic neocotic commented May 14, 2012

It appears that, although String.prototype.capitalize works in the web console, it doesn't exist in extension scope. I dropped the ball here as this should've really been picked up in testing.

Oddly, I'm seeing different results from this bug where some users are seeing it work, but not rendering internal template code.

@ghost ghost assigned neocotic May 14, 2012
@neocotic
Copy link
Member Author

@neocotic neocotic commented May 14, 2012

I'm hoping the solution is as simple as adding the following String.prototype.capitalize implementation;

String::capitalize = ->
  @replace /\w+/g, (word) ->
    word.charAt(0).toUpperCase() + word.substr(1).toLowerCase()
neocotic added a commit that referenced this issue May 14, 2012
@neocotic
Copy link
Member Author

@neocotic neocotic commented May 14, 2012

This has been fixed and I'll release an update immediately.

@neocotic neocotic closed this May 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.