Last modified: 2008-04-09 22:21:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13458 - An empty trailing line is added to preview
An empty trailing line is added to preview
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, patch, patch-reviewed
Depends on:
  Show dependency treegraph
Reported: 2008-03-20 22:24 UTC by Mormegil
Modified: 2008-04-09 22:21 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Do not append an empty line on preview (523 bytes, patch)
2008-03-20 22:24 UTC, Mormegil

Description Mormegil 2008-03-20 22:24:04 UTC
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>.
Comment 1 Mormegil 2008-03-20 22:24:39 UTC
Created attachment 4737 [details]
Do not append an empty line on preview
Comment 2 Chad H. 2008-04-09 19:48:06 UTC
Patch works for me. Just need someone with SVN to commit it.
Comment 3 Brion Vibber 2008-04-09 22:21:38 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.