Another reparse table attribute scenario
Closed, ResolvedPublic

Description

We have a bunch of these table_attribs_n tests already, but none capture this. The "class" is parsed as content because the pipe for attribute demarcation comes from the template.

{|
| class="hi" {{1x|{{!}}}} ho
|}

This is seen on https://ko.wikipedia.org/api/rest_v1/page/html/Maps_(%EB%A7%88%EB%A3%AC_5%EC%9D%98_%EB%85%B8%EB%9E%98)

{|
|-
!scope="row"{{singlechart|UK|2|date=2014-09-06}}
|}

Here is a perverse example. Effectively, the core parser generates the string for the line and then parses table cells and attributes, but it is too late for Parsoid with its tokenizer. Parsoid has a different rendering for the first 4 table rows because of this. As a compromise, we should handle only rows 1 & 2 (which is same as the original bug report) but not rows 3 & 4 which is particularly unreasonable in its usage of wikitext.

{|
|-
| abcd {{1x|{{!}}}} ho
|-
| style="border:1px solid red" {{1x|{{!}}}} ho 
|-
| abcd |{{1x|{{!}}}} ho
|-
| style="border:1px solid red" |{{1x|{{!}}}} ho
|-
| abcd {{1x|{{!}}{{!}}}} ho
|-
| style="border:1px solid red" {{1x|{{!}}{{!}}}} ho
|}

Event Timeline

ssastry triaged this task as Medium priority.Nov 6 2017, 4:50 PM
ssastry subscribed.

Reopening as non-duplicate since the code paths are different

Change 608655 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] WIP: Fix unhandled reparse table attribute scenario

https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/ /608655

Change 608655 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Fix unhandled reparse table attribute scenario

https://gerrit.wikimedia.org/r/608655

Change 622857 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] TableFixups: <th> & <td> cells can combine, not just <td> & <td>

https://gerrit.wikimedia.org/r/622857

Change 622857 merged by jenkins-bot:
[mediawiki/services/parsoid@master] TableFixups: <th> & <td> cells can combine, not just <td> & <td>

https://gerrit.wikimedia.org/r/622857

I am going to call this done for now. For any other unhandled production use cases of td cell recombining, we'll fill new tasks.

Change 625641 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a8

https://gerrit.wikimedia.org/r/625641

Change 625641 merged by jenkins-bot:
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a8

https://gerrit.wikimedia.org/r/625641