Page MenuHomePhabricator

Default whitespace for page property magic words should be to put them on their own line
Closed, ResolvedPublic

Description

Page property magic words like NOTOC should appear on their own line when serializing. Right now, editing a page that's already in category "Foo" and adding NOTOC as well as the category Bar produces:

[[Category:Foo]]NOTOC
[[Category:Bar]]

which shows that categories have the whitespace behavior we want (almost; they seem to get a preceding newline rather than being put on their own line, but that usually doesn't matter in practice) but magic words don't.


Version: unspecified
Severity: normal

Details

Reference
bz59671

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:18 AM
bzimport set Reference to bz59671.

This is especially bad for #REDIRECT, which doesn't work if it's not on its own line.

[[Category:Foo]]#REDIRECT [[Bar]]

results in a category followed by plain text "#REDIRECT [[Bar]]"

Change 111948 had a related patch set uploaded by GWicke:
Bug 59671: Serialize new page properties on their own line

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

Test case:

echo 'foo<meta property="mw:PageProp/notoc"/>bar' | node parse --html2wt
foo
NOTOC
bar

Change 111948 merged by jenkins-bot:
Bug 59671: Serialize new page properties on their own line

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

Input:

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

Output:

Foo#REDIRECT [[Foo]]

Expected output:

Foo
#REDIRECT [[Foo]]

Change 114089 had a related patch set uploaded by GWicke:
Bug 59671: Serialize new redirects on their own line

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

Change 114089 merged by jenkins-bot:
Bug 59671: Serialize new redirects on their own line

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

Scheduled for deployment tomorrow.