question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Thunderbird inserts line breaks in sent HTML that break code lines

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
t7kocommented, Dec 3, 2014

@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.

0reactions
ernstkicommented, Jan 8, 2019

@shalak This is indeed the same issue.

I haven’t noticed any ill effects since applying the workaround prescribed above some months ago.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Thunderbird Inserting Unnecessary Line Breaks
The issue is that Thunderbird is inserting these line breaks where the line changes in the view of the composer. This is an...
Read more >
Thunderbird, how to break lines when sending text emails?
The write-email editor should automatically break lines after 72 ... people that just insert line breaks in the middle of a sentence.
Read more >
Problems with Thunderbird line breaks - Stack Overflow
When composing a new mail in Mozilla Thunderbird, the lines will break after 72 characters: Lorem ipsum dolor sit amet, consectetur adipisicing elit....
Read more >
Disable word & line wrap on Mozilla Thunderbird | DECS
Word and line wrap are features that automatically moves words and lines that exceed a certain length onto a new line. By default,...
Read more >
Troubleshooting Line Length in HTML Email - Email On Acid
When any transfer agent or email client that can't handle more than 1000 characters per line receives it, the line will be broken...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found