Given this wikitext:
{{1x|1=<div class="a">a</div>}}Parsoid removes the parameter name:
{{1x|<div class="a">a</div>}}This destroys the wikitext and makes round-trip tests fail.
The reason for this behavior is that Parsoid actively strips numeric parameter names when they are not needed. While this is expected and correct behavior, it is not when:
- The content contains an equal sign and requires the parameter to be named because of this. It looks like the existing str_contains( …, '=' ) checks Parsoid does in a few places are not sufficient.
- When the original wikitext actually contained the parameter name, it shouldn't be removed. While the wikitext is functionally identical, we usually consider this a dirty diff and try to avoid it.
I run into this when I tried to construct parser test cases in Cite.