Page MenuHomePhabricator

Inconsistency between parsers handling paragraphs in a table division
Closed, DuplicatePublic

Description

Please look at this test case.

Usually, in a table division, first line is not wrapped, and following lines are wrapped inside <p> tags as in other contexts.

I would like to keep first line with second and third lines in the same paragraph. So I manually added a <p> tag to enclose the three lines.
It works well with Parsoid (2017 Wikitext Editor preview), but with MediaWiki parser, this make wrap each line inside its own <p> tag.

This is maybe T134469: doBlockLevels() inserts <p> and </p> randomly with no regard for HTML validity.

Event Timeline

Unfortunately it is T134469 yes. We don't plan on fixing it. Parsoid is going to become the default wikitext engine in the near future (in 2022) and many of these quirks will be automatically fixed. After that, we may also start removing workarounds in Parsoid to match core parser output. So, for example, the default behaviour for <td> cells would be to do what you are now manually doing by adding the <p> tag. But, anyway, till that time, this inconsistency will remain.