Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Wt2Html\PP\Handlers\LiFixups Class Reference

Static Public Member Functions

static migrateTrailingCategories (Element $li, DTState $state)
 Earlier in the parsing pipeline, we suppress all newlines and other whitespace before categories which causes category links to be swallowed into preceding paragraphs and list items.
 

Member Function Documentation

◆ migrateTrailingCategories()

static Wikimedia\Parsoid\Wt2Html\PP\Handlers\LiFixups::migrateTrailingCategories ( Element $li,
DTState $state )
static

Earlier in the parsing pipeline, we suppress all newlines and other whitespace before categories which causes category links to be swallowed into preceding paragraphs and list items.

However, with wikitext like this: *a\n\n[[Category:Foo]], this could prevent proper roundtripping (because we suppress newlines when serializing list items). This needs addressing because this pattern is extremely common (some list at the end of the page followed by a list of categories for the page).

Parameters
Element$li
DTState$state
Returns
bool

The documentation for this class was generated from the following file: