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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voca's title case function is capitalizing some words it shouldn't #51

Open
LandonSchropp opened this issue Apr 27, 2020 · 1 comment
Open

Comments

@LandonSchropp
Copy link

LandonSchropp commented Apr 27, 2020

Expected behavior 馃樃

When title casing an abbreviation, Voca capitalizes some words it shouldn't, like to or a. I realize this can get pretty complicated or can vary between styles, but it seems to me that it still be helpful to have a function that followed the general rules.

voca.titleCase("bruce willis is a badass") // => "Bruce Willis is a Badass"

Actual behavior 馃樋

Voca capitalizes those words.

voca.titleCase("bruce willis is a badass") // => 'Bruce Willis Is A Badass'

Steps to reproduce 馃懛

Call the functions as described above.

Technical details: 馃敡

Browser/OS type: macOS 10.15.3
Node version: 13

@panzerdp
Copy link
Owner

Voca library isn't created specifically for English language, thus I cannot incorporate is or a into the function as a special case.

In the longterm, I plan to make some improvements to incorporate behavior by locale.

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

No branches or pull requests

2 participants