Context
When wiring back the main content from a main+details sub-ref we're currently using the MWReferencesList to put it into the DOM for the Parsoid parser. Parsoid then retrieves it from there whenever parsing a MWReferenceNode with details.
Issues
- When there's no MWReferenceList there's no way to pass the content back.
- There are several issues with template produced main references and their content when converting back Wikitext
- With a {{reflist}} template we see that passing back the content gets tricky in some cases
Solution
Are more stable approach that could address all of the above issues would be to pass the main content similar to the details content using mw-data.
Migration should be roughly in this order:
- VE should emit mainBodyHtml when saving the page.
- Parsoid should emit mainBodyHtml when parsing a page.
- Parsoid should rely on mainBodyHtml when loading from VE.
- Deploy.
- VE can rely on mainBodyHtml when loading the page
- mainBody can be deprecated everywhere.