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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15458, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13458 - An empty trailing line is added to preview
An empty trailing line is added to preview
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, patch, patch-reviewed
Depends on:
Blocks:
  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: ---


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

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.


Navigation
Links