-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Explain the problem.
Suppose we are converting the following HTML to AsciiDoc:
<ul>
<li>
<p>Paragraph</p>
<p>Another paragraph</p>
<ul>
<li>Nested list</li>
<li>Nested list item two</li>
</ul>
</li>
</ul>
That first list item will contain a list continuation (+
line between the paragraphs). If there isn't a blank line before the nested list (**
marker), that marker will be interpreted as an opening bold marker, not a nested list.
Rendering that result with AsciiDoctor, or with a tool like https://asciidork-playground.vercel.app/ , demonstrate that we get:
... Another paragraph Nested list Nested list item two
The workaround is to insert a newline before the **
or ..
marker, so that instead of:
* Foo
+
bar
** baz
we get:
* Foo
+
bar
** baz
While that workaround can be applied manually, or with a multiline regex ^[+]$\n(^[^*].*\n)+^[*]
replaced with +\n\1\n*
, needing to do so hinders automated conversion from HTML to AsciiDoc. And I think this should be a fairly simple fix in the writer.
Pandoc version?
Locally I am using pandoc 3.2.1 on Alpine Linux (in a Docker container), but the issue is reproducible on https://pandoc.org/try as well.