Page MenuHomePhabricator

Paragraph wrapping bug when inline tags wrap block tags
Closed, ResolvedPublic

Description

In 8a7195d6b9557cc57061d18d5a643a424ff44f72, as part of the fix for T66901: Paragraph wrapping bug, I introduced a bug for the following test case:

[subbu@earth parsoid] echo '<span><div>x</div></span>' | parse.js --normalize
<p></p>
<div>x</div>
<p></p>

whereas PHP Parser + tidy combo only generates

<span><div>x</div></span>

The p-tags are introduce only when there is content after the <span> or before the </span> tags. So, my p-wrapper fix overreached a bit.

This is now introducing another set of false positives in T176363

Event Timeline

ssastry added a project: Parsoid.

Change 381518 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Apply removeUselessPWrappers to all tags except void tags

https://gerrit.wikimedia.org/r/381518

Change 381518 merged by jenkins-bot:
[mediawiki/services/parsoid@master] P-wrapper: Generalize removal of useless p-wrappers

https://gerrit.wikimedia.org/r/381518