Last modified: 2013-06-24 19:45:55 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 T51428, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49428 - Default whitespace for headings should have two new lines beforehand (i.e., one blank line before a heading)
Default whitespace for headings should have two new lines beforehand (i.e., o...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Gabriel Wicke
https://de.wikipedia.org/w/index.php?...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-11 11:43 UTC by Raimond Spekking
Modified: 2013-06-24 19:45 UTC (History)
8 users (show)

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


Attachments

Description Raimond Spekking 2013-06-11 11:43:34 UTC
Steps to reproduce:

1. Go into a heading

2. Change heading level from 2 to 3 (i.e.)

Expected output: Only the number of = should change

Actual output: Number of = is changed correctly but the newline before the heading is moved under the heading now.
Comment 1 James Forrester 2013-06-23 17:27:04 UTC
Indeed; a newline above or below a heading will be trimmed when the heading is changed in some manner. Is this Parsoid's behaviour?

https://www.mediawiki.org/w/index.php?title=VisualEditor:Bug_49428&diff=715815&oldid=715814
Comment 2 Ed Sanders 2013-06-23 19:36:44 UTC
Replacing a heading is the same a removing the old one and inserting a new one (transactionally speaking), so all the (non visible) whitespace information will be lost.

The output on the right is what you'd get if you created the document from scratch and as you are making structural changes, rather than changes within a paragraph, it is arguably by design that we throw away any old quirks in the wikitext for that section.
Comment 3 Ed Sanders 2013-06-23 19:41:03 UTC
On a separate note, the standard spacing around headings (on en.wiki at least) appears to be:

Foo

==Bar==
Baz

Where Parsoid renders:

Foo
==Bar==
Baz

I believe they have a default whitespace setting that could fix this so this could be raised as a Parsoid bug.
Comment 4 James Forrester 2013-06-23 19:43:15 UTC
(In reply to comment #3)
> I believe they have a default whitespace setting that could fix this so this
> could be raised as a Parsoid bug.

Marking as such.
Comment 5 Gerrit Notification Bot 2013-06-24 17:44:43 UTC
Related URL: https://gerrit.wikimedia.org/r/70214 (Gerrit Change Id8e5b87602e3ba0f0e1cf6b5c6e03f4949e7d053)
Comment 6 Gerrit Notification Bot 2013-06-24 19:01:01 UTC
https://gerrit.wikimedia.org/r/70214 (Gerrit Change Id8e5b87602e3ba0f0e1cf6b5c6e03f4949e7d053) | change APPROVED and MERGED [by jenkins-bot]
Comment 7 Gabriel Wicke 2013-06-24 19:45:55 UTC
Fix deployed.

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


Navigation
Links