Page MenuHomePhabricator

needless <h3>&nbsp;</h3> above category items with whitespace sort key
Open, Needs TriagePublic

Description

When page [[Foo]] has a [[Category:Foo]] of the same name, it is customary to use a sort key of U+0020 SPACE i.e. the wikitext [[Category:Foo| ]] to put said page at the beginning of the category for which it is the "main article".

In the Category:Foo html output, this creates a heading of <h3>&nbsp;</h3> at the top of the first column of items. While not directly visible, this <h3> does push the first <ul> of category items downward unnecessarily:

Example output:

<div class="mw-category">
	<div class="mw-category-group">
		<h3>&nbsp;</h3>           <!-- no heading at all would be better here -->
		<ul>
			<li><a href="/wiki/Foo" title="Foo">Foo</a></li>
		</ul>
	</div>
	<div class="mw-category-group">
		<h3>A</h3>
		<ul>
			<li><a href="/wiki/Aaron_Aardvark" title="Aaron Aardvark">Aaron Aardvark</a></li>
			<!-- more A -->
		</ul>
	</div>
	<!-- B–Z -->
</div>

Desired output:
Delete line 3 <h3>&nbsp;</h3> above.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptTue, Oct 8, 2:38 AM