handlebars-helpers icon indicating copy to clipboard operation
handlebars-helpers copied to clipboard

truncateWords helper not working

Open laurenhamel opened this issue 5 years ago • 1 comments

I'm attempting to use the truncateWords helper, but it's failing to truncate a block of text. It looks like the culprit is this line in the helper's definition:

if (num > arr.length) { ... }

My assumption is that it should read < instead of >.

laurenhamel avatar Mar 06 '19 19:03 laurenhamel

I think you're right, thanks for opening the issue.

Would you like to submit a PR with the fix? If so, if you add some tests like the truncate tests that would be really helpful.

doowb avatar Mar 06 '19 19:03 doowb