Badonkatrunc
Badonkatrunc copied to clipboard
Appears to truncate inconsistently between plain text and html elements
I've been using Badonkatrunc on a site for work, and I'm finding that if an element contains html elements, Badonkatrunc will truncate to after the last space which fits, while if the content is plain text, it truncates to before the same space.
I've put together an example of this behaviour on Codepen. As you can see, there's a trailing space in the <a/> element, but not in the plain text content.