At https://developer.sunamo.cz/en/sort-html-list-order/ you will find my latest creation. It is a single page that does a single thing, but it still made me happy to return for a little while to what I love – programming. Tomorrow I am heading up Lysa Hora (1323 m above sea level) again and will carry on looking for a job.
What the page does:
- You give it HTML code. The only requirement is that the lists whose item order you want to reverse are not nested.
- By default, the operation runs as soon as you paste the HTML, and the result is copied to the clipboard.
- If it encounters any tag other than
ulorol, it keeps it as it was. - It includes a simple HTML beautifier, which means some formatting is applied. No tabs or spaces are used, only new lines.
So if you want to try it out, paste in, for example, this code:
XML
<ul>
<li>A</li>
<li>B</li>
</ul>
<div>
<b>Input html:</b>
</div>
<ul>
<li>D</li>
<li>C</li>
</ul>