HomePhabricator

Drop auto-inserted empty elements before p-wrapping

Description

Drop auto-inserted empty elements before p-wrapping

Otherwise, dropping them later can result in an empty paragraph,
if they were the lone node that was wrapped.

There is an odd discrepancy in Remex where it leaves an empty formatting
tag un-p-wrapped. Parsoid, for its part, does treebuilding and
p-wrapping on the dom in two separate phases and therefore they get
wrapped. See the test as an example, "2. List embedded in a formatting
tag in a misnested way".

This can be observed on,
http://localhost:8000/es.wikipedia.org/v3/page/html/Real_Zaragoza/109357241

In the treebuilder, we're now omitting shadow metas for auto-inserted
start tags so that they don't interfere with the empty element
calculations. This is consistent with what we're already going for
auto-inserted end tags.

Change-Id: Ica418c1630270a9648a2b023d80ff759b8ab95d7

Details

Provenance
ArlolraAuthored on Jul 18 2018, 4:53 PM
Parents
rGPARfd90ccda2d04: Rename QuoteTransformer handler for clarity
Branches
Unknown
Tags
Unknown
ChangeId
Ica418c1630270a9648a2b023d80ff759b8ab95d7