-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Bug: Ctrl+Drag&Drop (copy) a selection beginning with #
creates a bad link
#1002
Comments
Do you mean editor to editor selection drag and drop? Can you post the text you're dragging? I assume the above is the result of the drop? If it's the actual editor Drag and Drop you are referring to then that falls into ACE Editor code that probably needs to be reported to ACE Editor. |
I mean primarily Ctrl+Drag&Drop a selection beginning with a
It is already there. The beginning of my initial post is used as source of the drag. Here it is again as proper Markdown text (which is in this case almost identical to the rendered text): MM v2.7.14 always creates a bad link when you Ctrl+Drag&Drop (copy) a selection that begins with a '#' character.
Creating a correct link (as with Ctrl+K dialog) would be very welcome if the selection is an entire header line,
otherwise the selection should be copied normally.
When a link is created then the selection without leading '#' and ' ' characters and without end of line should be used as `Link Text`. The selection started with the |
#
creates a bad link
You posted what got pasted not what was dragged. |
The issue here is that when the link comes in there's no way to tell about context. The logic that happens here handles all document drop operations (coming from the WebBrowser interface) so it handles editor text drops as well as file drops and other things like bookmark link drops. Additionally the editor handles the drag and drop operation based on the key combos (ie. move by default, copy for ctrl-drag) which accounts for the original text being deleted or staying behind. There's not a lot of wiggle room to provide custom behavior here. The link expansion was added initially for the bookmark drag feature that allows dragging bookmarks into the document. Luckily those bookmarks come in a specific format (ie. So, the best solution for this to simply not handle This is also inline with initial intent which never meant to auto-expand links in the first place. It'll be in 2.8.3.1 |
MM v2.7.14 always creates a bad link when you Ctrl+Drag&Drop (copy) a selection that begins with a '#' character.
Creating a correct link (as with Ctrl+K dialog) would be very welcome if the selection is an entire header line,
otherwise the selection should be copied normally.
When a link is created then the selection without leading '#' and ' ' characters and without end of line should be used as
Link Text
.EXAMPLE:
MM created the following link when the selection contained the text above beginning with "'#' character":
The text was updated successfully, but these errors were encountered: