Page MenuHomePhabricator

Redirect PageProp should always be hoisted to the top of the wikitext
Closed, ResolvedPublic

Description

When #REDIRECT[[Target]] appears in the wikitext but on the first line it will render as a list and not trigger the redirect functionality. While clients to probably keep the <link rel="mw:PageProp/redirect" stays at the top of the document, Parsoid should also handle cases where it gets moved.

Currently

<p>Foo</p>
<link rel="mw:PageProp/redirect" href="./Bar">

doesn't survive a round-trip.

Event Timeline

See the parserTests "New redirect".

Quite...

# FIXME: Should hoist the redirect to the top of the page and ensure there
# is only one.
Arlolra triaged this task as Medium priority.Feb 24 2016, 11:36 PM

Change 357917 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] T127421: Hoist redirect to the top of the wikitext

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

Change 357917 merged by jenkins-bot:
[mediawiki/services/parsoid@master] T127421: Hoist redirect to the top of the wikitext

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

Arlolra claimed this task.