Closed kevinansfield closed 4 years ago
Looks like there is a deeper issue here, valid html with a MarkupSection
creating element inside an <li>
will create invalid sections...
<ul>
<li>One</li>
<li><h3>Two</h3></li>
<li>Three</li>
<li>Four</li>
</ul>
= [ListSection, MarkupSection, ListItem, ListItem]
We've run into this when using mobiledoc-kit to migrate html content to mobiledoc content. This (invalid but surprisingly prevalent) html:
Results in a sections array such as:
ListItem
should only exist inside of aListSection
so thePost
model throws errors:I propose that the section parser should create a
ListItem
for unexpected children of a list element if it contains any text content, otherwise it should be ignored. PR for that incoming.