Last modified: 2014-10-29 22:26:21 UTC
If you give Parsoid a table with a <thead> and a <tfoot>, it's serialized completely wrong, and when the wikitext is then parsed back to HTML, the last row of the thead ends up being merged with the first row of the tbody, because row separators aren't emitted in the serializer apparently. <tfoot> is not included in this example, but something similar happens there. $ echo "<table><thead><tr><th>1 1</th><th>1 2</th></thead><tbody><tr><td>2 1</td><td>2 2</td></tr><tr><td>3 1</td><td>3 2</td></tr><tr><td>4 1</td><td>4 2</td></tr></tbody></table>" | node tests/parse.js --html2html --normalize <table> <tbody> <tr> <th>1 1</th> <th>1 2</th> <td>2 1</td> <td>2 2</td> </tr> <tr> <td>3 1</td> <td>3 2</td> </tr> <tr> <td>4 1</td> <td>4 2</td> </tr> </tbody> </table>
Bug 66341 and the fix for it (https://gerrit.wikimedia.org/r/#/c/138731) is related. Looks like that fix needs a tweak to add a table row "|-" after the thead is processed and this will get fixed.