See this transcript:
$ cat /tmp/wt {{1x<invalid> |{{2x<invalid>y}}| }} {{1x<invalid> |{{2x<invalid> y}}| }} {{1x<invalid> |{{2x<invalid> y}} }} $ php bin/parse.php < /tmp/tpiwt <p data-parsoid='{"dsr":[18,53,0,0]}'>{{1x<invalid> |{{2x<invalid>y}}| }}</p> <p data-parsoid='{"dsr":[55,73,0,0]}'>{{1x<invalid> | }}</p> <p data-parsoid='{"dsr":[75,110,0,0]}'>{{1x<invalid> |{{2x<invalid> y}} }}</p>
So the middle wikitext snippet cause the output to be broken. This is because of the 'splitNlTokens' and associated code in AttributeExpander. The first two snippets lead to the tokenizer creating a <td> with complex attributes ("{{2x<invalid>..."). The last one is a non-attribute td and so doesn't break.
Of the first two snippets, the second snippet expands to a set of tokens that has a newline which triggers the splitTokens code in AttributeExpander which just messes up the <td> token, and when the TSP kicks in later, it drops a bunch of content based on the output of the AttributeExpander.
This effectively is the reason for Parsoid's broken output on https://tpi.wikipedia.org/wiki/Templet:Convert/LoffAonSoff?useparsoid=1