-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
If for example I have a title that has no spaces in it, aka var title = 'MY_SUPER_AMAZING_TITLE'
, and I call truncate like so:
{{title | truncate(15, '...')}}
my output is just '...'
I added
if (last === 0)
last = length - clamp.length
basically if it gets to the start and didn't find any spaces, just default back to the full string and cut it at the max.
I think this should be the standard behavior (I expect that if there is some title at all, it will show something, not just '...'). What do you think?
Metadata
Metadata
Assignees
Labels
No labels