Last modified: 2014-10-29 22:26:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74702, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72702 - Parsoid does not understand thead/tfoot
Parsoid does not understand thead/tfoot
Status: NEW
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Parsoid Team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-29 21:08 UTC by Roan Kattouw
Modified: 2014-10-29 22:26 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2014-10-29 21:08:34 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>
Comment 1 ssastry 2014-10-29 22:26:21 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links