I have a nested ordered list being rendered from Markdown using react-markdown
. The list is numbered correctly in Chrome but not in Firefox. It has the following HTML structure:
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>
<p>words</p>
<p>words</p>
<ol>
<li>nested item 1</li>
<li>nested item 2</li>
</ol>
</li>
<li>Item 4</li>
</ol>
Expected:
Item 1
Item 2
Item 3
words
words
- nested item 1
- nested item 2
Item 4
Actual:
Item 1
Item 2
Item 3
words
words
- nested item 1
- nested item 2
"6. Item 4" (wrapping this in quotes to show incorrect numbering)
I've tried experimenting with the indentation of the markdown to see if that was causing the issue, but the result remained incorrect. The nested ordered list is contained within a list element so the HTML is valid, and is working correctly in other browsers.