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

Comments

Projects
None yet
1 participant
@neocotic
Member

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

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic May 14, 2012

Member

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()
Member

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

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic May 14, 2012

Member

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

Member

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