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

convertToSentenceCase converts only the first character #19

Open
ryan-carpenter opened this issue Feb 24, 2024 · 0 comments
Open

convertToSentenceCase converts only the first character #19

ryan-carpenter opened this issue Feb 24, 2024 · 0 comments

Comments

@ryan-carpenter
Copy link

The convertToSentenceCase function takes a string and converts the first character of the first word to uppercase but does not convert uppercase characters to lowercase.

String Result Expected Success?
example one Example one Example one
Example two Example two Example two
Example Three Example Three Example three
EXample four E Xample four Example four
EXAMPLE FIVE EXAMPLE FIVE Example five

Workaround: convert the string to lowercase using Texty Convert to Lowercase or VSCode Transform to Lowercase before using Texty Convert to Sentence Case.

Possible solution: modify Texty convertToSentenceCase to include toLower() before upperFirst().

export function convertToLowerCase(content: string): string {

export function convertToSentenceCase(content: string): string {

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

1 participant