At least cebwiki and svwiki seem to be using this pattern of embedding a table inside another table in fosterable position and relying on Tidy doing some weird fixup that inverts the order of the tables.
Ex: https://sv.wikipedia.org/wiki/Kugelstein and https://ceb.wikipedia.org/wiki/Wujieyue_Shan.
svwiki pages have this wikitext:
{| border="1" {{klimatöversikt ... }} |}
and cebwiki pages have this:
{| border="1" {{climate chart ... }} |}
In both cases, we effectively have HTML of the form:
<table border="1"> <---- GENERATED BY THE {| WIKITEXT <table class="infobox" style="width: 19.5em; float: left; clear: left; margin-left:0em;margin-right:1em; text-align: center; border: solid 1px silver" cellspacing="0" cellpadding="0"> <---- GENERATED BY THE TEMPLATE ... </table> </table>
This is broken HTML and a HTML5 parser (RemexHTML, HTML5Depurate, Balancer, Parsoid) will generate output of the form:
<table border="1"></table> <--- EMPTY TABLE <table class="infobox" style="width: 19.5em; float: left; clear: left; margin-left:0em;margin-right:1em; text-align: center; border: solid 1px silver" cellspacing="0" cellpadding="0"> .... table content here ... </table>
However, Tidy removes the infobox-class based table skeleton and retains the table border="1" in place yielding:
<table border="1"> ... table content here ... </table>
Given this Tidy output (where the templates outermost table shell is removed), a good way to get similar output in Tidy, RemexHTML, and Parsoid would be to edit the templates to remove the opening <table> and closing </table> from the cebwiki:climate chart and the svwiki:klimatöversikt and other such templates on other wikis where this pattern is used.
This difference has been found in the Tidy replacement project tests (row 3 of Replacing Tidy Test Results) and while comparing PHP parser output and Parsoid output.
A good way to do this would be to:
- Edit the relevant template on one of these wikis by removing the opening <table> and closing </table>
- Use the "Preview page with this template" functionality before saving the changes and verify that the new output is still similar:
- Save, and purge an affected page via ?action=purge
- Verify that RemexHTML output now matches the Tidy output via the url: https://<wiki>.wikipedia.org/w/index.php?title=<title>&action=parsermigration-edit.
- (Optional) Verify that Parsoid output now matches the Tidy output (by going to https://<wiki>.wikipedia.org/api/rest_v1/page/html/<title> and force-reloading the page).
See also: https://www.mediawiki.org/wiki/Parsing/Replacing_Tidy/FAQ#Simplified_instructions_for_fixing_pages