You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go here or to any "raw" source page for a Github README (like ours).
Select-all, copy.
Paste into Gmail.
Click "Markdown Toggle".
Result: Pretty disastrous rendering. Specifically, it mostly looks like the whole text is being treated as a single line.
Preliminary diagnosis
jsHtmlToText (the library we use for HTML-to-plaintext) adds newlines to text based on tags, and doesn't pay attention to stuff like white-space: pre; -- which changes how newlines should be treated.
Possible solutions
Make the HTML-to-plaintext processing more intelligent. E.g., check styles like white-space.
Make the HTML-to-plaintext processing simple: just use innerText (or textContent in Gecko). It'll require proper testing, but some initial fooling around suggests it works well.
Workaround
Don't paste <pre> text. Paste plaintext or convert to plaintext (like with Gmail's "Strip formatting" button).
The text was updated successfully, but these errors were encountered:
Reproduction
Result: Pretty disastrous rendering. Specifically, it mostly looks like the whole text is being treated as a single line.
Preliminary diagnosis
jsHtmlToText (the library we use for HTML-to-plaintext) adds newlines to text based on tags, and doesn't pay attention to stuff like
white-space: pre;
-- which changes how newlines should be treated.Possible solutions
white-space
.innerText
(ortextContent
in Gecko). It'll require proper testing, but some initial fooling around suggests it works well.Workaround
Don't paste
<pre>
text. Paste plaintext or convert to plaintext (like with Gmail's "Strip formatting" button).The text was updated successfully, but these errors were encountered: