With AsciiDoc, if I write this:
p1
* l1
* l2
p2
It translates to HTML as roughly
<p>p1</p>
<ul><li>l1</li><li>l2</li></ul>
<p>p2</p>
Is there a way to write the equivalent of the following?
<p>p1
<ul><li>l1</li><li>l2</li></ul>
p2</p>
With AsciiDoc, if I write this:
p1
* l1
* l2
p2
It translates to HTML as roughly
<p>p1</p>
<ul><li>l1</li><li>l2</li></ul>
<p>p2</p>
Is there a way to write the equivalent of the following?
<p>p1
<ul><li>l1</li><li>l2</li></ul>
p2</p>
No, that can't be done.
The reason is that your requested way is illegal in HTML(5): <ul>
tags can not be nested inside <p>
tags[*].
The answer to this related SO question gives the details, with references to the HTML specification.
(In a sense, your question is therefore a duplicate of that question.)
[*] Officially, they can't, but you'll probably find that if you do so anyway, browsers will find a way to render it. Probably by making p1
and p2
their own paragraphs.