This has been a long time coming, and is a major update for the
plugin. Previously, if you decided to truncate a string, it would
strip all the HTML from that string. Essentially, it worked by slicing
the string in two, and by hiding the second half. The new version uses
a series of regular expressions, and maintains two copies of the
string. I won't go into all the technical details, but I threw some
pretty nasty HTML at it, and it seemed to work well. Empty HTML tags
after the truncate will be removed, but any HTML closing tag after the
truncate associated with an HTML opening tag before the truncate will
remain. So if you truncated mid list item, formatting would still be
maintained for the list.

Give it a go, and let me know if you discover any bugs. Thanks!

http://www.reindel.com/truncate/

Brian Reindel

Reply via email to