Fix truncation to be aware of html tags, and happen after markdown render