Formatting paragraphs with an <ol><li> element

For my use this applies specifically to the formatting of endnotes in a document. I guess I’m interested in how others approach this. Perhaps there is another way to approach the markdown formatting.

I was looking for Hugo output that allows multiple paragraphs within an <li> element, eg.

<ol>
   <li>
      <p>First paragraph...</p>
      <p>Second paragraph...</p>
   </li>
</ol>

My markdown looks like this:

1. First paragraph...

Second paragraph...

2. First paragraph...

Hugo gives me this:

<ol>
   <li>
      ::marker
      First paragraph...
   </li>
</ol>
<p>Second paragraph...</p>
<ol start="2">
   <li>
      ::marker
      <p>First paragraph...</p>
   </li>
</ol>

Indent. See this CommonMark test.

2 Likes

Wonderful. Exactly what I needed. Also the link to the CommonMark spec for future reference: https://spec.commonmark.org/

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.