blakeembrey / change-case

Convert strings between camelCase, PascalCase, Capital Case, snake_case and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug]: Sentence case isn't changing the case correctly

JoltCode opened this issue · comments

image

As you can see, it's removing all punctuation, and not capitalising correctly either.

Desired output is the same as the input;

The quick brown fox jumps over the lazy dog. Hello there!

That’s by design, anything in the change-case library works this way and is documented in the respective README. Maybe you want to try the title-case library instead (with the sentence option enabled)?

Maybe the README isn’t clear enough? I can try updating it if you have an idea of what you think is poorly documented. I recently shrunk the document to try and improve clarity, so maybe it’s that?

Maybe the README isn’t clear enough? I can try updating it if you have an idea of what you think is poorly documented. I recently shrunk the document to try and improve clarity, so maybe it’s that?

Yeah I couldn't see that punctuation was removed anywhere - but I probably missed it!

It wasn't very clear, I tried updating it here: 759c9a5. Let me know if that helps. Proper sentence casing is also a tricky problem, so do let me know if the title-case library helps and if anything is missing. The main difficulty I had working on that library is that it's hard to tell if something is meant to be upper/lower with domain specific words.

It wasn't very clear, I tried updating it here: 759c9a5. Let me know if that helps. Proper sentence casing is also a tricky problem, so do let me know if the title-case library helps and if anything is missing. The main difficulty I had working on that library is that it's hard to tell if something is meant to be upper/lower with domain specific words.

Ahh that's perfect! Thanks so much!! 😄