Closed adam-zethraeus closed 10 years ago
I'll try look into this on the weekend (but I'm not doing a very good job keeping my promises on this!)
I'm adding you as a collab. now. Just keep my jshint and whitespace the same, and ping me when you want this thing pushed to npm. :)
Thanks! Will do. :)
As far as the above issue: it looks like it's related to the way counting works and when it is performed. When counting characters the 'over the limit' count happens before a character that is never added (as opposed to after a character that is). As a result in this example <p>characters</p><i>what</i>
the limit is hit at w
when </p><i>
has already been added to the buffer.
having a count check at the end of tags that doesn't actually increment the counter in the char case might be a reasonable fix.
This fails with an extra
<i></i>
just as words mode did before https://github.com/zethraeus/Downsize/commit/5568bfe68d050e3073168daaf18da77a43cb8d9bi have not further researched why.