Commons:Graphics village pump/November 2022

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Weird newline in file description page

This question about the Commons file page File:Roving_bridge.svg was originally asked at en:wikipedia:SVG_help#Weird_newline_in_file_description_page but received no response.

In the description on Android Chrome both on mobile and desktop views, there is a vertical gap between points 3 and 4. If I remove point 4, the gap appears between points 2 and 3. Would anyone know what is causing it and a fix?

Thanks,
cmɢʟee ⋅τaʟκ 21:15, 1 November 2022 (UTC)

@Cmglee:
The description is held in a table; the four items are in a td element:
<div class="hproduct commons-file-information-table">
<table class="fileinfotpl-type-information toccolours vevent mw-content-ltr" style="width: 100%; direction: ltr;" cellpadding="4">

<tbody><tr style="vertical-align: top">
<td id="fileinfotpl_desc" class="fileinfo-paramfield" lang="en">Description<span class="summary fn" style="display:none">Roving bridge.svg</span></td>
<td class="description">
<p>Changing towpaths without unhitching the tow line:
<br>1. Failure to consider the issue
<br>2. Tow line passing through a slot
<br>3. Running the path under the bridge
</p>
<br>4. Using a dedicated roving bridge</td>
</tr>

<tr style="vertical-align: top">
<td id="fileinfotpl_src" class="fileinfo-paramfield" lang="en">Source</td>
<td>
<span class="int-own-work" lang="en">Own work</span></td>
</tr>

<tr style="vertical-align: top">
<td id="fileinfotpl_aut" class="fileinfo-paramfield" lang="en">Author</td>
<td>
<a href="/wiki/User:Cmglee" title="User:Cmglee">Cmglee</a></td>
</tr>


</tbody></table>
</div>
The first three items are in a paragraph element (p) and the fourth item is outside that paragraph. The space between 3 and 4 is the paragraph break. It looks like a wikitext parser error.
A workaround is to delete the line breaks and just use <br />.
Another workaround is to use # instead of <br />.
Glrx (talk) 22:28, 1 November 2022 (UTC)
@Glrx: Thank you very much for investigating and filing the bug report. I've updated the description with an ordered list. Cheers, cmɢʟee ⋅τaʟκ 19:48, 3 November 2022 (UTC)