title: How to cut off string after the first line in the paragraph
body: <p>I have the string as show below:</p>
  
  <pre><code>XXX:Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur cursus lacus sed
  justo faucibus id pellentesque nunc porttitor. Sed venenatis tempor dui, nec mattis dolor
  ultrices at. Duis suscipit, dolor sed fringilla interdum, magna libero tempor quam, sed
  molestie dui urna sed tellus.
  </code></pre>
  
  <p>How can I add a restriction and cut the string off at the first line? (using javascript).</p>
  
  <p>The end result I would expect is as follows:</p>
  
  <pre><code>XXX:Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur...
  </code></pre>