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

titleCase fails to transform name #415

Open
viveleroi opened this issue Feb 4, 2024 · 1 comment
Open

titleCase fails to transform name #415

viveleroi opened this issue Feb 4, 2024 · 1 comment

Comments

@viveleroi
Copy link

I have a line of code in an hbs helper:

<WindowHeader onClose={onClose} title='{{titleCase name}}' />

When I run a plop command and name is set to someName, all of the kebab and pascal casing conversions work fine, but the titleCase one does nothing.

The output is:

<WindowHeader onClose={onClose} title='someName' />

Am I missing something or doing something wrong? The handlebars braces are being read just fine as it's replacing the template with the value, it's just not converting the value to title case

@tidemann
Copy link

tidemann commented Feb 6, 2024

I'm also having issues with titleCase.
Did a quick test with variable name set to "test-foo-bar":
{{name}} {{pascalCase name}} {{titleCase name}}
outputs:
test-foo-bar TestFooBar Test-Foo-Bar
I would expect {{titleCase name}} to output: "Test Foo Bar"

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