Last modified: 2013-06-24 19:45:55 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.
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
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.
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.
(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.
Related URL: https://gerrit.wikimedia.org/r/70214 (Gerrit Change Id8e5b87602e3ba0f0e1cf6b5c6e03f4949e7d053)
https://gerrit.wikimedia.org/r/70214 (Gerrit Change Id8e5b87602e3ba0f0e1cf6b5c6e03f4949e7d053) | change APPROVED and MERGED [by jenkins-bot]
Fix deployed.