title: Find rendered line breaks with javascript
body: <p>I have this situation :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div { width: 200px }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt; example example example example example&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Text jumps to next line automatically when filling the full width of the <code>&lt;div&gt;</code>.  </p>
  
  <p>Using javascript how can I have the rendered content in the above line?</p>
  
  <p><em>note:</em> In the character string, there is no newline character</p>
  
  <p><strong>expected result from above snippet:</strong></p>
  
  <p><code>"example example example"</code> corresponding with row 1 and <code>"example example"</code> corresponding with row 2</p>