helpers / handlebars-helpers

188 handlebars helpers in ~20 categories. Can be used with Assemble, Ghost, YUI, express.js etc.
http://assemble.io/helpers/
MIT License
2.22k stars 365 forks source link

Titleize handlebar doesn't titleize input string correctly. #405

Open Shashwat121 opened 2 years ago

Shashwat121 commented 2 years ago

Hi there, hope you are doing well.

I am using the titleize handlebar in one of my application and came to witness that titleize handlerbar doesn't titleize the input string correctly.

For example, if the string is "jon-smith", the titleized version of it should be "Jon-Smith". Another example could be if the string is "a.b", the titleized version should be "A.B'. Input texts which have a space character in them are only titleized correctly. There might be an usecase where a and b in "a,b" are two different words and need to be titleized separately as "A.B", like for instance "jerry.thomas" titleized as "Jerry.Thomas".

Can we have a fix for this? If yes then I'd like to take this up and work on it going forward as I think we'd just need to tweek the regex expression defined in the titleize handlebar.