-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html message line breaks are not rendered #4
Comments
<h1>Subject</h1>\n\n<p>Body</p> You'd like the HTML in I think the above is pretty natural and also how a human would write the HTML. Humans typically don't put all their HTML tags on the same line. Whitespace (new lines) like this don't cause issues. |
Thanks for the reply. No the both newlines at the beginning of the formatted_body template are no problem at all. The problem is that I got an html-formatted email which got simplified by email2matrix as the formatted body. In the |
Ahh.. this is because of the way we do things. Email2Matrix only deals with the plain-text part of the email message. As per its documentation:
I imagine that your email has no plain-text part, which causes its HTML to be down-converted to plain-text. Which probably yields an ugly "table" in any case. Depending on
In any case, this whole thing makes me wonder whether we should have an option for simply relaying the HTML part of an email as-is. Right now we're pretty insistent on turning it into plain-text. I'm not sure how useful that is though.. Perhaps you (or others) could share some feedback on what kind of stuff you'd like to send. In the end, relaying HTML as-is may not work great either, as riot-web (or other clients) may choke on more complicated parts. |
Yep, that’s the problem. I must admit I am not entirely sure if the problem is in enmime or blackfriday. I have no idea which portion of HTML riot is willing to render. But obviously actually passing the table through might look much nicer. |
To elaborate on that: If enmime makes just one linebreak where there is actually supposed to be a rendered linebreak that will look fine in the plaintext version. But a markdown renderer as blackfriday will assume that two lines without a blank line in between are in the same paragraph and remove the newline. So using first a |
When using email2matrix with
SkipMarkdown = false
I get matrix messages with theformatted_body
field containing html, but\n
line breaks. At least riot doesn’t render those. Is it perhaps necessary to replace them with<br>
tags? Or does this mean the email (from prometheus in my example) is not standard conform?The text was updated successfully, but these errors were encountered: