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

Dragging multiple image files inserts malformed markdown #167

Closed
cyotek opened this Issue Jul 19, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@cyotek

cyotek commented Jul 19, 2016

If I drag a single image file into MDE, then I get a nice link. If I drag multiple files, then MDE malforms the links by inserting the markdown for the second image inside the markdown for the first and so on. This description makes no sense, so an example.

I drag two image files (both located in the same folder as my document) into MDE. The first is called snaplines-custom-wm.gif, and the second snaplines-default-wm.gif.

I would expect to get something like this

![snaplines-custom-wm](snaplines-custom-wm.gif)
![snaplines-default-wm](snaplines-default-wm.gif)

But instead get

![snap![snaplines-default-wm](snaplines-default-wm.gif)
lines-custom-wm](snaplines-custom-wm.gif)

(including an extra blank line that doesn't appear in the above block)

@mike-ward mike-ward added the bug label Jul 19, 2016

@mike-ward

This comment has been minimized.

Show comment
Hide comment
@mike-ward

mike-ward Jul 24, 2016

Owner

Oddly, I can't repro this. Maybe you can zip me a document and images that demonstrates the problem?

Owner

mike-ward commented Jul 24, 2016

Oddly, I can't repro this. Maybe you can zip me a document and images that demonstrates the problem?

@cyotek

This comment has been minimized.

Show comment
Hide comment
@cyotek

cyotek Jul 25, 2016

Surprised you can't repro, it happens pretty much all the time for me. Doesn't seem to be related to any document or set of file names that I've observed.

Try this

Title
=====

Some words

I stuck my cursor on the blank line, in case it was something to do with dragging before or after the cursor (doesn't seem to be). Then I tried dragging a pair of image files test.png and palette.png into the editor.

Didn't seem to matter where I dropped the files, invariably, they were munged into a corrupt form.

The only exception that seems solid was if I dropped the image files past the last line of the document - then they were inserted properly. Or, if the document was fully empty. Apart from those two conditions, malformed markdown was virtually always.

cyotek commented Jul 25, 2016

Surprised you can't repro, it happens pretty much all the time for me. Doesn't seem to be related to any document or set of file names that I've observed.

Try this

Title
=====

Some words

I stuck my cursor on the blank line, in case it was something to do with dragging before or after the cursor (doesn't seem to be). Then I tried dragging a pair of image files test.png and palette.png into the editor.

Didn't seem to matter where I dropped the files, invariably, they were munged into a corrupt form.

The only exception that seems solid was if I dropped the image files past the last line of the document - then they were inserted properly. Or, if the document was fully empty. Apart from those two conditions, malformed markdown was virtually always.

@mike-ward

This comment has been minimized.

Show comment
Hide comment
@mike-ward

mike-ward Jul 25, 2016

Owner

I was dropping past the end of the document. Explains it. Thanks.

Owner

mike-ward commented Jul 25, 2016

I was dropping past the end of the document. Explains it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment