Page MenuHomePhabricator

extra empty line when editing page
Closed, InvalidPublic

Description

Author: aik.bold

Description:

  1. start new page creation
  2. enter page content, e.g. "abc" (no line breaks here)
  3. press "Preview" button
  4. notice, that empty line was added to text

Since 2 empty lines in wikitext are converted to line break (<br>) that brokes down article formatting when we save 2 templates and use them in one page like this:

test1
{{Template:Sample1}}

test2

{{Template:Sample2}}

test1 and test2 sould be in 1 line, but thay are not.

Problem could be fixed in EditPage.php in 1215 line (in 1.11.0 version of MediaWiki) by moving "</textarea>" up by 1 line, so empty line would not be added at each page edit.


Version: 1.11.x
Severity: enhancement

Details

Reference
bz13198

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:04 PM
bzimport set Reference to bz13198.
bzimport added a subscriber: Unknown Object (MLST).
  1. There's always a line break at the end in editing for convenience -- otherwise it's very annoying that there's no line break at the end.
  1. All final whitespace is stripped on save.
  1. Output for your template example appears entirely correct to me, and totally unrelated to the editing complaint.