title: Replace end of HTML text with a few dots
body: <p>I have the following mark-up:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h5&gt;
    &lt;a href="javascript:void(0);"&gt;I am a very long title and I need to be shortened&lt;/a&gt;
  &lt;/h5&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I make it so that if the <code>h5</code> text is above a certain number of characters, I get rid of the other characters and replace them with a "..."?</p>