Page MenuHomePhabricator

An empty trailing line is added to preview
Closed, ResolvedPublic


When displaying a preview, an empty line is appended to the edited wikitext in EditPage::getPreviewText().

I don’t know what was the point of this, however, it is wrong: When the wikitext ends with categories or interwiki, this empty line is trimmed, so that it has no effect at all. In other cases, the preview looks different to the final result, which is against the definition of preview.

If some margin above the edit window/toolbar is intended, it should be displayed consistently (no matter if the article contains categories or not), and as that margin would only be a matter of design, it should be done with CSS, not with that <p><br /></p>.

Version: unspecified
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:07 PM
bzimport set Reference to bz13458.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 4737
Do not append an empty line on preview


Patch works for me. Just need someone with SVN to commit it.

Behavior normalized in r33056. Spacer now is used when preview is above the edit box, and isn't used when it isn't.

Still using a <p><br/></p> though, as it's a bit wonky when we do/don't want it. :)

If the proper CSS selectors are supported by IE 6, this could probably be done in CSS though.