Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

Whe i copy text/code that has newlines firefox duplicates them, adding an extra newline

  • 4 antwoorden
  • 1 heeft dit probleem
  • 12 weergaven
  • Laatste antwoord van David

more options

When i copy code for example and paste into the IDE/notepad/anywhere it adds extra lines. For example go https://infoarena.ro/job_detail/2580081?action=view-source and copy a few lines and paste them into notepad to reproduce.

When i copy code for example and paste into the IDE/notepad/anywhere it adds extra lines. For example go https://infoarena.ro/job_detail/2580081?action=view-source and copy a few lines and paste them into notepad to reproduce.

Alle antwoorden (4)

more options

If you check the page source then you will notice that this is not plain text, but rather complicated HTML table code that is better suited to be treated as HTML code then as plain text, so if you copy and paste this as plain text then you get extra line breaks because of all the span tags. You can possibly use an extension to copy the selected text as plain text.


The first two lines place this code on the clipboard as flavor text/html.

<meta http-equiv="content-type" content="text/html; charset=utf-8"><pre><code class="hljs cpp"><table class="hljs-ln"><tbody><tr><td class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;iostream&gt;</span></span></div></td></tr><tr><td class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></td><td class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;fstream&gt;</span></span></div></td></tr></tbody></table></code></pre>

View selection source gives this code:

<div class="code"><pre><code class="hljs cpp"><table class="hljs-ln"><tbody><tr><td class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></td><td class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;iostream&gt;</span></span></div></td></tr><tr><td class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></td><td class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;fstream&gt;</span></span></div></td></tr>
more options

Hi, Thanks for the reply, but i tried it and does not work.

more options

Here is another extension that you can try, however it removes all white-space including empty lines.

more options

Yes, it removes those indeed. My question is : Is this not a bug? It does not happen in chromium-based browsers, only in firefox-based(cliqz has the same problem too).