wordpress-mobile / AztecEditor-iOS

A reusable native iOS visual HTML text editor component.
Mozilla Public License 2.0
612 stars 146 forks source link

Multiple ordered lists, one after the other, not rendered correctly #1326

Closed javierjosefernandes closed 8 months ago

javierjosefernandes commented 3 years ago

Describe the bug When there are multiple ordered lists, one after the other, the lists aren't rendered as expected. Screenshot 2021-03-08 at 11 59 42

To Reproduce

  1. Using pod "WordPress-Aztec-iOS", "~> 1.0"
  2. Call Aztec.EditorView.setHTML() with the following HTML code as String:
    <ol><li>First item in list 1</li></ol>
    <ol><li>First item in list 2</li></ol>
    <ol><li>First item in list 3</li></ol>

Expected behavior The number of each list item should be 1 as the following screenshot: Screenshot 2021-03-08 at 12 00 08

Smartphone:

Additional context Also, the issue is reproducible using the example app if you create an ordered list, add one item after the other, and then, for the second item, you unselect the ordered list option and select it again. Doing this, Aztec generates the following HTML code:

<ol><li>First item in list 1</li></ol>
<ol>First item in list 2</ol>
<ol>First item in list 3</ol>