markdown-here: Thunderbird inserts line breaks in sent HTML that break code lines

Thunderbird seems to make an effort pretty-print the HTML in the email source when it sends. This means that it (sometimes) inserts line breaks into long lines.

It seems to know to not put line breaks into <pre> blocks. However, it will put them into inline <code> text. But because of the fix for issue #52, our inline <code> elements have the white-space: pre-wrap; style, which means that newline characters are rendered and the line is broken.

To reproduce this, just take the sample MD from the MDH options page, paste it into Thunderbird email, render it, and send it. Then look at the source for the email – there’s a break between “inline” and “code”, and “code” ends up on the line below.

I’m not sure how to fix this without re-breaking #52.

Workaround: If you don’t care about the “correct” behaviour described in #52, then remove the white-space: pre-wrap; from the code rule in your Primary Styling CSS.

About this issue

  • Original URL
  • State: open
  • Created 11 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

@adam-p : I’d say:

  • Inline code should wrap
  • There is no sense in maintaining breaks in inline code. Want breaks? Use code block.
  • Not so sure about preserving multiple spaces, but I’d personally vote for wrapping, not for spaces.

PS. I created a ticket for Thunderbird, related to this issue. They’ve posted something as an answer, could not quite understand it (since I’m no HTML expert…). Here it is: https://bugzilla.mozilla.org/show_bug.cgi?id=1097174

Hope it helps.