Copy HTML with color background changes to a light color

Description

I usually compose emails with programming code that I copy from Visual Studio Code as HTML but no matter what the background color is it always is changed to the same color of mailspring background code utility, and depending the font color It is hard to read. In other applications when I paste code copied from Visual Studio Code in HTML format they also respects the indentation levels, in mailspring composer all tabs or spaces at the beginning of the lines are trimed.

To Reproduce…

Steps to reproduce the behavior:

  1. Copy as HTML text with background color from somewhere (Visual Studio Code for example)
  2. Compose a message
  3. Paste it
  4. See error

Screenshots

For example, this is the original code that I copy from Visual Studio Code:

This is how it looks like in Mailspring when it’s copied:

And this is how it looks like when copied in Thunderbird:

Setup

  • OS and Version: Solus OS (Linux) 4.1 Fortitude
  • Mailspring Version: 1.7.8