Page MenuHomePhabricator

<div> followed by <span>.*\n throws lint errors
Closed, DeclinedPublicBUG REPORT


The following Wikicode throws two lint errors: Missing end tags and Stripped tags, both on the <span>:

<div></div><span>[anything or nothing]

2021-02-23_085329_261x363_screenshot.png (363×261 px, 18 KB)

However, this does not:


I think the former example should not be a lint error?

Event Timeline

Arlolra moved this task from Backlog to Parsoid on the MediaWiki-extensions-Linter board.
Arlolra added a subscriber: Arlolra.
> echo -e "<div></div><span>[anything or nothing]\n</span>post" | php bin/parse.php --linting
<div data-parsoid='{"stx":"html","dsr":[0,11,5,6]}'></div><span data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[11,50,6,0]}'>[anything or nothing]
<p data-parsoid='{"dsr":[39,50,0,0]}'>post</p></span>

This is the result of Parsoid mimicking T134469. The linter is correct here, the div suppresses paragraph wrapping on the line and the closing span on the next line gets paragraph wrapped on its own. In the example tested above, the string "post" is added to show the closing span being stripped, to make that a little clearer.