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!

Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

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

  • 4 odpovědi
  • 1 má tento problém
  • 12 zobrazení
  • Poslední odpověď 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.

Všechny odpovědi (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).