Page MenuHomePhabricator

Linter fails to detect missing table end
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Create a simple table with no table-ending wikicode

See https://en.wikipedia.org/w/index.php?title=User:Jonesey95/sandbox2&oldid=1053750496

What happens?:
Linter does not report a missing table end.

What should have happened instead?:
Linter should report a missing table end.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

Event Timeline

Arlolra subscribed.

This is wikitext table syntax and Parsoid seems to ignore if it isn't a literal html tag,
https://github.com/wikimedia/parsoid/blob/master/src/Wt2Html/PP/Processors/Linter.php#L431

There's no clear explanation as to why,
https://github.com/wikimedia/parsoid/commit/7e46f1341b6b2f00bc7fc5176825abf55b2e1041
https://github.com/wikimedia/parsoid/commit/3fbaac03ea062ad3a3872f040594d14b057e1601

And there's an exception for i/b, so I suppose we need one here too.

Here's a demonstration that this causes actual problems:

https://en.wikipedia.org/w/index.php?title=User:Jonesey95/sandbox2&oldid=1053768927

The first section contains an unclosed table. The next two sections are contained within the unclosed table instead of being their own sections. This syntax should report one of the two table-related Linter errors.

Arlolra triaged this task as Medium priority.Aug 15 2023, 7:34 PM
Arlolra moved this task from Backlog to Parsoid on the MediaWiki-extensions-Linter board.

Change 960128 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Lint missing wikitext syntax table ends

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

Change 960128 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Lint missing wikitext syntax table ends

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

Change 960694 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Don't lint missing wikitext table ends when followed by deletable-table-tag

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

Change 960694 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Don't lint missing wikitext table ends when followed by deletable-table-tag

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

Change 962706 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.18.0-a26

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

Change 962706 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.18.0-a26

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