How to substract ammount of characters from twitter fetcher

How to substract ammount of characters from twitter fetcher

I have a twitter fetcher script and simply want to cut ammount of characters from tweets. I need to get output of Twitter fetcher, cut it and replace in HTML. So here is my code, but the problem is that it returns text without links. I'm using this pen to modify - https://codepen.io/DeoThemes/pen/jyGPgr

$("#tweets .tweet").each(function() { $(this).html($(this).text().substring(0, 50)); });