Page MenuHomePhabricator

Remove "only newlines in trailing text" special case for category and interwiki links
Closed, ResolvedPublic

Description

Category and interwiki links typically strip whitespace preceding them.

There's an odd special case, though: they *also* strip trailing newlines *if newlines are the only thing between the category/interwiki and the next link*.

This is arguably counterintuitive behavior, for example:

[[Category:Foo]] 

[[Foo]][[es:Alimento]]

[[Foo]]

renders as [[Foo]][[Foo]] due to this weird special case.

I think this behavior can be removed, but since the last time I touched this code my fix had to be reverted after unexpected consequences (T174639), I'm going to play it safe and make this a separate issue/patch set.

Event Timeline

Change 376872 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/core@master] Remove "only newlines in trailer" special case for category/language links

https://gerrit.wikimedia.org/r/376872

Change 376872 merged by jenkins-bot:
[mediawiki/core@master] Remove "only newlines in trailer" special case for category/language links

https://gerrit.wikimedia.org/r/376872

cscott claimed this task.