Page MenuHomePhabricator

?action=edit&section=new shouldn't put a newline above text when no section heading is given
Closed, InvalidPublic

Description

Author: mike.lifeguard+bugs

Description:
Currently if you don't put anything in the section heading, the text is appended with a blank line above it. Please remove that blank line.


Version: unspecified
Severity: normal
URL: http://en.wikibooks.org/w/index.php?title=Wikibooks:Sandbox&diff=1316682&oldid=1316681

Details

Reference
bz16116

Event Timeline

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

Issue in the same area:

  1. create a page with 2 sections
  2. remove the middle section

Observed: the two remaining sections are separated with an additional newline.

Expected: no additional newline should remain after removing a section.

Ugh: 1. Create a page with 3 sections :)

mike.lifeguard+bugs wrote:

(In reply to comment #1)

Issue in the same area:

  1. create a page with 3 sections
  2. remove the middle section

Observed: the two remaining sections are separated with an additional newline.

Expected: no additional newline should remain after removing a section.

That's the same thing I described in bug 14938, though you did a much better job :)

I think the described behaviour is expected behaviour. Adding a section without a heading is adding a paragraph. If no leading whitespace would be added, the text would be appended to previous paragraph (if that is not a heading), which would be counter-intuitive. Proposing to close as either INVALID or WONTFIX (with a preference for the former).

EN.WP.ST47 wrote:

Closing invalid, here is my reasoning:

If the extra linebreak were not added, adding a 'section' without a heading would not add a new anything at all, but rather append text to the last paragraph. I wasn't aware that using section=new without a heading was actually used by anyone, but it makes more sense to have the new text begin a new paragraph. If it did not, do so by default, then users who wanted to add a new paragraph would have to leave the first line of the edit box blank, which is unintuitive.

If the issue described in comment 1 is someone that anyone wants fixed, go ahead and make a bug for it, that actually does sound like a bug.