Page MenuHomePhabricator

Null lines between [[Category:...]] and [[link]] are ignored
Closed, InvalidPublic

Description

Author: wikipedia01

Description:
If the source is:
ABC [[Category:...]]

[[link]]
(source end)
the null lines between [[Category:...]] and [[link]] are ignored, and it is same as:
ABC [[Category:...]] [[link]]


Version: unspecified
Severity: minor

Details

Reference
bz7358

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:25 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz7358.
bzimport added a subscriber: Unknown Object (MLST).

ayg wrote:

Any line breaks immediately preceding a category or interlanguage link are
compressed to a space. This is presumably to avoid excessive whitespace at the
end of articles, since it's conventional to place them all there. Maybe it
would be best to just strip any whitespace that isn't followed by rendered
content, rather than assuming category/interlanguage will be at the end? (Or is
that not the only reason for this?)

wikipedia01 wrote:

Do you mean it is deliberately that the line breakes between a "category" and a
"link" or 2 "category"'s are compressed to a space?

ayg wrote:

As far as I can determine from a quick sandbox edit, *any* whitespace
immediately preceding a category/interlanguage link is compressed. It doesn't
seem to have to be followed by a link. And yes, this is probably deliberate,
for the reason I mention, but it's not necessarily the best decision.

wikipedia01 wrote:

Thank you for all.

robchur wrote:

According to the parser code, this was done in response to bug 87.

EN.WP.ST47 wrote:

The consensus appears to be that this is invalid, and that the behavior is intentional to avoid other ugliness. For those interested, any whitespace around (both sides) a category link is still stripped, but that's why they go at the bottom of articles >.>