Funkcjonalność tej witryny będzie ograniczona w czasie konserwacji. Jeśli artykuł nie rozwiązuje twojego problemu i chcesz zadać pytanie, to nasza społeczność wsparcia jest dostępna na @FirefoxSupport na Twitterze i /r/firefox na Reddicie.

Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Więcej informacji

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

  • 4 odpowiedzi
  • 1 osoba ma ten problem
  • 12 wyświetleń
  • Ostatnia odpowiedź 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.

Wszystkie odpowiedzi (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).