Page MenuHomePhabricator

Minor P-wrapping diff between Parsoid & PHP Parser+Tidy combo
Closed, ResolvedPublic

Description

In this snippet,

<table><tr><td>
[[File:Cambodia-map-blank.PNG|162px]]<div>Cambodia</div></td></tr></table>

the PHP parser + Tidy combo doesn't wrap the image in a p-tag. Parsoid wraps it in a p-tag. This then introduces a small whitespace rendering diff in the infobox -- this might be the source of several of the visual diffs seen in infoboxes where there is a leading image.

This could potentially also go away when Tidy goes away. Might not be worth fixing right yet.

Related Objects

Event Timeline

ssastry raised the priority of this task from to Medium.
ssastry updated the task description. (Show Details)
ssastry added a project: Parsoid.
ssastry added a subscriber: ssastry.

A simpler test case is,

<table><tr><td>
a</td></tr></table>

This is similar to the tests around "Paragraphs inside blockquotes/divs (no extra line breaks)"

where the comment will say,

## This is a corner case interaction between the paragraph wrapping in the
## php parser's BlockLevelPass and Remex.  `doBlockLevels` has a notion of
## some tags which close paragraphs (and thus prevent wrapping on their line),
## of which "div" is one, but do p-wrapping inside them.  These are referred
## to as "never suppressing".  Remex, for its part, doesn't traverse into
## "div"s to p-wrap.  Hence, we only get this partial wrapping.
Arlolra claimed this task.

The Parsoid and Remex outputs now match