Page MenuHomePhabricator

Paste from macOS Terminal to 'new wikitext editor' inserts extra newline on every line
Closed, ResolvedPublic

Description

Steps to reproduce:

Screen Shot 2018-08-08 at 2.23.31 PM.png (522×880 px, 133 KB)

Screen Shot 2018-08-08 at 2.23.46 PM.png (1×1 px, 237 KB)

Expected behavior:

  • the text should paste exactly as originally, with one newline per line

Actual behavior:

  • every line has a blank line between it and the next line

Workaround:

  • use "paste and match style" instead:

Screen Shot 2018-08-08 at 2.23.52 PM.png (740×1 px, 217 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The OSX terminal produces HTML, with each line wrapped in a <p>:

<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>

<p class="p1"><span class="s1">$ echo "Hello"</span></p>
<p class="p1"><span class="s1">Hello</span></p>

Change 549174 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Set the plain text 'pasteSpecial' flag when data.isPlainText is true in NWE

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

Change 549174 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Set the plain text 'pasteSpecial' flag when using plain text paste in NWE

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

Change 549469 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Follow-up I83b98e41: Always sanitize when using plain text paste in NWE

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

Change 549469 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Follow-up I83b98e41: Always sanitize when using plain text paste in NWE

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

ppelberg claimed this task.