Page MenuHomePhabricator

[EPIC] Remove most p-wrapping from mediawiki
Open, LowPublic

Description

In general we don't need to p-wrap most content -- list items, for example -- only places where we actually have a double-newline. That is, \n\n could simply insert a <p> (letting the tree-builder handle the rest) then we could do a focused DOM pass that looks for :first-child being text and :nth-child(2) being a <p> tag and wrap the first child for consistency. That would be *much* simpler than doBlockLevels currently is.

Removing <p> wrappers, even when they don't affect the visual appearance of the page, affects the DOM structure and thus gadgets & etc, and so this is an EPIC-level change. Still worth doing, though!