Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to blocks adds unordered and ordered list #5172

Closed
oandregal opened this issue Feb 21, 2018 · 4 comments
Closed

Convert to blocks adds unordered and ordered list #5172

oandregal opened this issue Feb 21, 2018 · 4 comments
Labels
[Feature] Paste [Type] Bug An existing feature does not function as intended

Comments

@oandregal
Copy link
Member

oandregal commented Feb 21, 2018

After converting a really long post (here's the source in case you want to replicate), some of the lists included both UL and OL tags.

Before

lists3-before

After

lists3-after

FWIW, the majority worked flawlessly, it's only a couple that didn't work. The source contains really bad formatted HTML originally, so it's a wonder that Gutenberg can work with this at all. I'm just leaving it here in case it's useful as an extreme real-world use case for parsing.

Feel free to close it.

@oandregal
Copy link
Member Author

@aduth this is the follow-up issue that I mentioned at #3799

@Soean Soean added the [Type] Bug An existing feature does not function as intended label Feb 21, 2018
@designsimply
Copy link
Member

I tested this by copying the source of the http://nosolosoftware.com/essays/gestion-de-proyectos-de-software-libre/ post (gist) and pasted it into the Gutenberg editor and found the following:

After pressing cmd+v to paste, I saw the following warning in Firefox:

A web page is slowing down your browser. What would you like to do? [Stop It] [Wait]

screen shot 2018-07-03 at tue jul 3 4 57 54 pm

Leading space caused the first block to be code instead of paragraph:

screen shot 2018-07-03 at tue jul 3 5 02 38 pm

Lists that appeared to be bullets became numbered—this may make sense given that the unordered list was nested inside an ordered list (but it's worth noting that the browser appears to parse the HTML differently).

screen shot 2018-07-03 at tue jul 3 5 18 32 pm

A list with several nested ordered lists became a mix of numbered and bulleted.

screen shot 2018-07-03 at tue jul 3 5 21 15 pm

Successive lists with one item each only retain the first list item.

screen shot 2018-07-03 at tue jul 3 6 20 38 pm

Seen at http://alittletestblog.com/wp-admin/post.php?post=13869&action=edit running WordPress 4.9.6 and Gutenberg 3.1.1 using Firefox 61.0 on macOS 10.13.5.

@designsimply
Copy link
Member

Successive lists with one item each only retain the first list item.

Moved to #7702.

@designsimply
Copy link
Member

Closing this issue because the source HTML from the original issue is not valid (as mentioned) and because the original issue says "feel free to close." 🙂

Sample HTML from the post:

<ol>
<ol>
<ol>
<ol>
<ul>
<li><a title="http://www.gnu.org/licenses/licenses.html" href="http://www.gnu.org/licenses/licenses.html" rel="nofollow">Licencias de software libre</a>, Free Software Foundation</li>
<li><a title="http://www.opensource.org/licenses" href="http://www.opensource.org/licenses" rel="nofollow">Licencias de software libre</a>, Open Source Initiative</li>
<li><a title="http://law.bepress.com/expresso/eps/773/" href="http://law.bepress.com/expresso/eps/773/" rel="nofollow">Copyright and Open Source Software Licensing</a>, de Sau Sheong Chang</li>
<li><a title="http://itmanagement.earthweb.com/osrc/article.php/12068_3803101_1/Bruce-Perens-How-Many-Open-Source-Licenses-Do-You-Need.htm" href="http://itmanagement.earthweb.com/osrc/article.php/12068_3803101_1/Bruce-Perens-How-Many-Open-Source-Licenses-Do-You-Need.htm" rel="nofollow">How many Open Source licenses do you need?</a>, Bruce Perens</li>
<li><a title="http://www.sanchez-crespo.com/archivo/software-libre/EstudioGPLv3.pdf/view" href="http://www.sanchez-crespo.com/archivo/software-libre/EstudioGPLv3.pdf/view" rel="nofollow">Estudio sobre la licencia GPL v3 y otras licencias open source</a>, Sánchez Crespo abogados y consultores</li>
</ul>
</ol>
</ol>
</ol>
</ol>

Note: Element ol not allowed as child of element ol in this context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants