Super subtle, weird beta bug: copy & paste from Markdown preview copies incorrect images in Mail but not TextEdit

So here’s a weird one from DT3beta5:

  1. I have a markdown document with two images with image links that use x-devonthink-item URIs
  2. It renders correctly on-screen, but when I copy (cmd-C) the content from either the preview pane or the regular preview (open a window with the doc in “render” mode) and then paste into a new email in Mail on High Sierra, the first image is correct, but the second image is a copy of the first image

Also, pasting into Mail, the sizes are correct as rendered in the preview with the MultiMarkdown size specifications (despite the second image being wrong), but pasting into, say, an RTFD text document in TextEdit, then the images are both right, but the sizes are ignored somehow.

This is a bit of a bizarre interaction w/ Apple’s stuff, but I figured that I’d ask since I have no understanding about how the pasteboard works in these situations (e.g. is it HTML at that point and one application is correctly retrieving the URI and one is not?)

I’m not seeing an issue here with public beta 6.

Do note Mail is likely converting to HTML for composing emails.

The data should be registered as rich text in the clipboard.

Also, we have no control over how TextEdit (or other applications) handle the clipboard data. This is what’s in the internals of the RTFD file I tested…

{{\NeXTGraphic ocr.jpeg \width15760 \height10840 \noorient \appleattachmentpadding0 \appleembedtype0 \appleaqc
}¨}\pard\pardeftab720\partightenfactor0
\cf2 \
{{\NeXTGraphic img.jpg \width7538 \height1994 \noorient \appleattachmentpadding0 \appleembedtype0 \appleaqc
}¨}}

As you can see it has width and height dimensions hardcoded into the file.