Yep! I get the same behaviour.
And strictly speaking, it’s not a bug. Firefox is copying the HTML exactly as requested:
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p dir="auto">When I copied the undermentioned, from Discourse, to my e-mail client:</p>
<pre data-code-wrap="diff" dir="auto" class="codeblock-buttons">
<div class="codeblock-button-wrapper" style="right: 0px;"></div>
<code class="lang-diff hljs language-diff" data-highlighted="yes">
<span class="hljs-meta">@@ -1,11 +1,11 @@</span>
<span class="hljs-deletion">-Young volunteer award – celebrating young volunteers, aged 16-24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.</span>
<span class="hljs-addition">+The Young Volunteer Award celebrates young volunteers, aged 16–24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.</span>
</code>
</pre>
The resulting difference after pasting is from Chromium inlining the styles whereas Firefox is not. Paring it down to a single line highlights[1] what’s going on:
# firefox
<span
class="hljs-deletion">
-Young volunteer award – celebrating young volunteers, aged 16-24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.
</span>
# chromium
<span
class="hljs-deletion"
style="background: none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 224, 224); color: rgb(192, 45, 46);">
-Young volunteer award – celebrating young volunteers, aged 16-24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.
</span>
(linebreaks added)
Chromium inlines from class="hljs-deletion" the inline CSS style="background: none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 224, 224); color: rgb(192, 45, 46);" to the span, since what it’s pasting into probably doesn’t have that style.
heh ↩︎