blakeembrey / change-case

Convert strings between camelCase, PascalCase, Capital Case, snake_case and more
MIT License
2.27k stars 97 forks source link

title-case: a quoted word with a period in it doesn't get capitalized #266

Closed teddybradford closed 1 year ago

teddybradford commented 3 years ago

I think I found a bug in title-case: When a string has a quoted word with a period in it, that word isn't capitalized.

For example:

titleCase("Is human activity responsible for the climate emergency? New report calls it ‘unequivocal.’")
// Is Human Activity Responsible for the Climate Emergency? New Report Calls It ‘unequivocal.’

I would expect unequivocal to be capitalized, but it is not.

blakeembrey commented 1 year ago

I have released a fix for this here: https://github.com/blakeembrey/change-case/releases/tag/title-case%404.1.0.