Open viveleroi opened 7 months ago
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"
I encountered the same issue with version 0.32.0.
As an alternative, I'm using the sentenceCase
function, which produces a similar result.
For example, hello_world
becomes Hello world
, but the ideal result would be Hello World
.
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 tosomeName
, 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