title: html tidy strange behaviour on stackoverflow snippet
body: <p>I try to tidy the following html code, and I get an strange result. li elements are not aligned. 
  Is it correct to have al ul tag and text inside an <code>a</code></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;a&gt; Text Inside a
  &lt;ul&gt;
    &lt;li&gt;li1 content&lt;/li&gt;
  &lt;li&gt;li2 content&lt;/li&gt;
  &lt;li&gt;li3 content&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why It could happens?</p>