VisualEditor: Copying and pasting results in new blank section heading: "== <nowiki /> =="
Closed, ResolvedPublic1 Story Points

Description

Intention: To create a block of text to check line wrapping.

Expectation: That I'd end up with a block of plain paragraph-formatted text.

Steps to reproduce:

  1. Start with a page containing some text and a few section headings. In my case, it was a list.
  1. Select all the text in one section using arrow/cursor keys, including all of the last line (including the blank part at the end of the paragraph), but none of the section heading that follows.
  1. Copy this.
  1. Make a new, blank paragraph-formatted line.
  1. Paste the copied text into the new line.

Results: You get the desired paragraph, followed by a == <nowiki /> == section heading.

See https://en.wikipedia.org/w/index.php?title=User:Whatamidoing_(WMF)/sandbox&diff=577354576&oldid=577352415

(For bonus points, if you skip step #5, you'll get your pasted text set to ==Section heading== formatting.)


Version: unspecified
Severity: normal
See Also:
T52100: VisualEditor: Deletion across a header caused it to remain without WS, leading Parsoid to output "==<nowiki/>=="
T61647: VisualEditor: Cutting (removing) last section on the page leaves blank section heading == <nowiki /> ==

Details

Reference
bz55769
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz55769.

This may be related to bug 49452 and/or bug 50100

Change 162310 had a related patch set uploaded by Jforrester:
MWHeading: Don't put self in output if contents are blank or whitespace

https://gerrit.wikimedia.org/r/162310

Change 162310 had a related patch set uploaded (by Jforrester):
MWHeading: Don't put self in output if contents are blank or whitespace

https://gerrit.wikimedia.org/r/162310

Patch-For-Review

Change 162310 merged by jenkins-bot:
For empty / whitespace-only headings, output <p> instead of <h#>

https://gerrit.wikimedia.org/r/162310