Page MenuHomePhabricator

Lint errors not detected: bold missing end coupled with stripped bold tag in next parameter
Closed, InvalidPublic

Description

In at least some situations, a template that uses bold formatting markup at the beginning of one parameter and the same markup at the end of the next parameter, which should result in one "missing end tag" error and one "stripped tag" error, shows no errors at all.

See https://en.wikipedia.org/w/index.php?title=1990_PBA_Third_Conference&oldid=960918743 for an example.

Event Timeline

When the bold syntax is split across the parameters,

===Finals berth incentive playoff===
{{basketballbox|bg=#eee|date=December 4
|place=[[PhilSports Arena|The ULTRA]], [[Pasig City|Pasig]]
|TV=[[PBA on Vintage Sports|Vintage]]
|report=[https://news.google.com/newspapers?id=a48VAAAAIBAJ&sjid=KwsEAAAAIBAJ&pg=5212%2C1086067 recap]
|team1='''[[Shell Turbo Chargers|Shell Rimula X]]
|score1=137'''
|team2= [[Great Taste Coffee Makers|Presto Tivolis]]
|score2=114
}}

it expands to,

<tr style="vertical-align:top">
<td colspan="3" style="text-align:center; border-style:none">'''[[Shell Turbo Chargers|Shell Rimula X]] 137''', [[Great Taste Coffee Makers|Presto Tivolis]] 114
</td></tr>

which is balanced and parses as,

> echo "'''[[Shell Turbo Chargers|Shell Rimula X]] 137'''" | php bin/parse.php
<p data-parsoid='{"dsr":[0,49,0,0]}'><b data-parsoid='{"dsr":[0,49,3,3]}'><a rel="mw:WikiLink" href="./Shell_Turbo_Chargers" title="Shell Turbo Chargers" data-parsoid='{"stx":"piped","a":{"href":"./Shell_Turbo_Chargers"},"sa":{"href":"Shell Turbo Chargers"},"dsr":[3,42,23,2]}'>Shell Rimula X</a> 137</b></p>

Is the ask here to detect unbalanced syntax in template parameters, regardless of how it combines post-expansion?

The edit, however, to,

===Finals berth incentive playoff===
{{basketballbox|bg=#eee|date=December 4
|place=[[PhilSports Arena|The ULTRA]], [[Pasig City|Pasig]]
|TV=[[PBA on Vintage Sports|Vintage]]
|report=[https://news.google.com/newspapers?id=a48VAAAAIBAJ&sjid=KwsEAAAAIBAJ&pg=5212%2C1086067 recap]
|team1='''[[Shell Turbo Chargers|Shell Rimula X]]'''
|score1=137'''
|team2= [[Great Taste Coffee Makers|Presto Tivolis]]
|score2=114
}}

results in a lint error,

{"type":"missing-end-tag","dsr":[37,413,null,null],"templateInfo":{"name":"Template:Basketballbox"},"params":{"name":"b","inTable":true}}
Arlolra triaged this task as Medium priority.Aug 15 2023, 4:51 PM
Arlolra moved this task from Backlog to New Linters on the MediaWiki-extensions-Linter board.

Either something has changed or I was wrong in my analysis. It looks like the bot/WPCleaner edit was technically incorrect, but understandable. This bug report can be closed.

@Jonesey95: Feel free to close as invalid in that case via the Add Action...Change Status dropdown

Close as invalid (or no longer valid).