Page MenuHomePhabricator

Parsoid: Default whitespace for categories to be a single newline seperator between, and two beforehand
Closed, ResolvedPublic


Hope this is clear - currently:

<p>Text</p><link rel="mw:WikiLink/Category" href="./Category:Foo"><link rel="mw:WikiLink/Category" href="./Category:Bar"><link rel="mw:WikiLink/Category" href="./Category:Baz">

serialises to:


and ideally we'd like:



Is this do-able? (If the two-new-lines bit is hard, happy to postpone that side.)

Version: unspecified
Severity: trivial
See Also:



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:42 AM
bzimport set Reference to bz48557.

Categories are already serialized on their own line (see bug 48332). The extra newline is possible if you only add categories at the end of a document.

OK, I'm a fool, you'd already done most of the request in bug 48332, sorry. Re-purposing. Gabriel says that this needs us to add new categories to the end of the DOM; I think we do. Will check first.

It looks like whitespace around categories is working properly now. The only remaining issue is whitespace around {{DEFAULTSORT}}, which needs the same rules as categories. also helps in preserving whitespace around existing categories and defaultsorts when we edit them.

Related URL: (Gerrit Change Ib37ccaca5ff83950742ced8f4ec3af13e81fbfab)