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!

Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

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

  • 4 risposte
  • 1 ha questo problema
  • 12 visualizzazioni
  • Ultima risposta di 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.

Tutte le risposte (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).