Note that <li> example is perfectly valid, and will be parsed correctly by any html5 capable parser. Per the html5 spec, the closing tag on an <li> element is optional.[0]
[0] - https://html.spec.whatwg.org/#optional-tags
An li element's end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.
<!doctype html>
<title></title>
<ul>
<li>item1
<li>item2
</ul>> Though we understand many people would love to use Markdown in Slack messages, we have no plans to support it. Our message formatting is similar to other popular services like Skype and Google Talk, and is intended for a majority of our users who are unfamiliar with Markdown. However, we'll keep it in mind for the future.
https://get.slack.help/hc/en-us/articles/202288908-Format-yo...
On a sidenote:
This wouldn't be possible without an extremely well-defined HTML spec :) For example, if I write the following in a hypothetical browser-parsed Markdown document: Which one should show up as bold? What about italic? Which one should just be surrounded by {1,2} asterisks?Conversely, if I have:
Many browsers can determine (non-trivially, and not always, granted) that there's an unclosed `<li>` tag inside a closed `<ul>` environment and work with that. It's generally a different class of problems, though.