title: HTML list content direction in rtl
body: <p>I have a simple HTML unordered list</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;a href="#"&gt;link1&lt;/a&gt; &lt;a href="#"&gt;link2&lt;/a&gt; text1&lt;/li&gt;
      &lt;li&gt;text1 &lt;a href="#"&gt;link&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;text1 text2&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>If I have normaln ltr layout, final content looks like this</p>
  
  <p><em>link1 link2</em> text1<br>
  text1 <em>link</em><br>
  text1 text2</p>
  
  <p>However, if the content inside a list item is mixed, and direction is set to rtl, I get a complete mess</p>
  
  <p><em>link2</em> text1 <em>link1</em><br>
  text1 <em>link</em><br>
  text2 text1</p>
  
  <p>which means only the list element containing text only gets reversed properly. Any ideas on how to get this working correctly?</p>
  
  <p>edit:
  It seems that the content flow depends on the actual content. A simple example like this doesn't work</p>
  
  <pre><code>&lt;ul dir="rtl"&gt;
    &lt;li&gt;
      &lt;a href="#"&gt;12:30 - 13:30&lt;/a&gt;
      some text
      &lt;a href="#"&gt;link text&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;ul dir="ltr"&gt;
    &lt;li&gt;
      &lt;a href="#"&gt;12:30 - 13:30&lt;/a&gt;
      some text
      &lt;a href="#"&gt;link text&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>