jquery-expander
jquery-expander copied to clipboard
Bug around preserveWord = true
On Line 173: https://github.com/kswedberg/jquery-expander/blob/master/jquery.expander.js#L173
Shouldn't it be
summaryText = backup(summaryText, o.preserveWords && allHtml.slice(summaryText.length).length>0);
Current logic will ignore slicepoint when you set preserveword to true, basically truncating strings even if there's nothing to truncate.
Thanks for the report, @ttback . Would it be possible to provide an example of this failing? That way I can use it in my tests when I make a fix.
Any chance you can show me a snippet of html that fails?
@kswedberg sorry, never got around it, too busy hacking on some features. I don'r remember the particular example now, but I will try it with some example strings on Monday.
It is actually a very simple case, probably just any string that is shorter then truncate length would be truncated if you set 'preserveword' to be true.