Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Ovo će web mjesto raditi na ograničen način, dok obavljamo održavanje stranice. Ako neki članak ne riješi tvoj problem i ako želiš postaviti pitanje, naša zajednica za podršku spremna je pomoći na Twitteru @FirefoxSupport i na Redditu /r/firefox.

Pretraži podršku

Izbjegni prevare podrške. Nikad te nećemo tražiti da nas nazoveš, da nam pošalješ telefonski broj ili da podijeliš osobne podatke. Prijavi sumnjive radnje pomoću opcije „Prijavi zlouporabu”.

Saznaj više

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

  • 4 odgovora
  • 1 ima ovaj problem
  • 12 prikaza
  • Posljednji odgovor od 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.

Svi odgovori (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).