Last modified: 2014-02-18 23:58:52 UTC
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.
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.