title: innerHTML displaying differently then expected
body: <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;!DOCTYPE html&gt;
  &lt;html&gt;
     &lt;head&gt;
        &lt;meta charset="UTF-8"&gt;
        &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"&gt;
     &lt;/head&gt;
     &lt;body&gt;
        &lt;ul&gt;
           &lt;li id=1 class="draggable" draggable="true"&gt;
              &lt;div class="input-group" &gt;
                 &lt;p draggable="false" style="width:400px; outline: none" &gt;Text&lt;/p&gt;
                 &lt;button onclick="testFunction(this)"&gt;update&lt;/button&gt;
              &lt;/div&gt;
           &lt;/li&gt;
        &lt;/ul&gt;
        &lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
        &lt;p id="demo"&gt;&lt;/p&gt;
        &lt;script&gt;
           function myFunction() {
             document.getElementById("demo").innerHTML = document.getElementById(1).innerHTML;
           }
           function testFunction(el) {
             var attr = document.createAttribute('contenteditable');
             attr.value = 'true';
             el.parentNode.firstElementChild.setAttributeNode(attr)
             el.parentNode.firstElementChild.focus()
           }
        &lt;/script&gt;
     &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When pressing the "update" button and adding new text and lines to the paragraph and pressing the "Try It" button, the new line goes. I expected it to be the same, since I copied the innerHTML.</p>