User-facing example: go to https://www.mediawiki.org/wiki/User:Roan_Kattouw_%28WMF%29?veaction=edit , make a small change, click "Save page" then "Review changes". Note that the diff drops the category. Now click "Return to save form" and "Resume editing", undo your changes manually (NOT using the undo function), and review changes again. This time the categories aren't dropped.
Note that in the Parsoid HTML, the category is fostered to before the table. Selser then seems to drop it on the floor, but only if there was a change to the body.
I was unable to reproduce this exact bug on the command line but I did see weird things:
$ echo '<table><tr><td>Hello</td></tr>[[Category:Foo]]' | node tests/parse.js --wt2wt [warning][enwiki/Main Page] DSR inconsistency: cs/s mismatch for node: BODY s: 0 ; cs: 30 [[Category:Foo]]<table><tr><td>Hello</td></tr> $ echo '<table><tr><td>Hello</td></tr>[[Category:Foo]]' | node tests/parse.js --wt2wt --selser <nowiki>[[Category:Foo]]</nowiki> {| |Hello |}
Version: unspecified
Severity: normal