adam-p / markdown-here

Google Chrome, Firefox, and Thunderbird extension that lets you write email in Markdown and render it before sending.
http://markdown-here.com
MIT License
59.64k stars 11.26k forks source link

Google Inbox: page content div getting displayed #240

Open treyharris opened 9 years ago

treyharris commented 9 years ago

Procedure to reproduce (it's a bit involved, and it doesn't seem like the minimal procedure to reproduce, I'm pretty sure I've seen it elsewhere, but the following is repeatable):

  1. Reply to a message using Inbox for Android. (This is only seen in replies.)
  2. Enter at least two paragraphs of plain text (no Markdown necessary) in the draft on Android. (Text is top-posted above the unedited quote.)
  3. Save as draft by hitting the back button.
  4. Navigate to Drafts in Inbox using a Chrome with MDH.
  5. Open the draft just saved in Android.
  6. Edit the draft to add some Markdown, and toggle.
  7. Send the message.

Expected result:

Actual result:

adam-p commented 9 years ago

I failed to reproduce it.

(Although I did notice that Inbox-Android's draft is structured differently than the way desktop Inbox does it. It puts <p> elements around double line break chunks, instead of <div>. And then the desktop client keeps using <p>, so a single Enter keypress gives you a new paragraph instead of just bumping down a line. Weird that they differ. But I think MDH will cope with that.)

Are you able to reproduce this with a short message? With long messages, MDH or not, one thing that can happen is that Gmail will truncate it and then have a "Show the entire message" link at the bottom. If the truncation happens in the middle of a HTML element, you'll end up with an artifact like what you saw.