21

I recently converted a post into an edit to the question (where it belonged). Both the post and the question had at least one link [1]: http.... The system did not reassign the number scheme, so the first [1] link became "broken".

Please reset the numbers in the links like when adding a link through the edit function.

Example: https://judaism.meta.stackexchange.com/posts/3316/revisions (Rev 2)

1

1 Answer 1

4

This bug exists because the SE system supports two styles of links. There is the "inline" or "direct" style of link:

[link text](http://link_target_url)
![image description](http://image_source_url)

But in addition, there is the "indirect" link, where the URLs are placed in a separate place, usually at the bottom of the post:

[link text][1]
![image description][2]

...

[1]: http://link_target_url
[2]: http://image_source_url

The problem is that the link and image insertion tools built into the editor insist on using the latter form, which requires the assignment of arbitrary numbers to provide the association between the two parts of the link. The "convert to edit" feature fails to account for the collisions between the numbers used in the two posts being merged.

My point is that if the post editor used the first link format instead of the second to begin with, this would become a non-issue with no further work required.

8
  • 1
    But with a regular edit the numbers are automatically reassigned so the functionality already exists, it just doesn't happen when converting a post to an edit.
    – Cai
    Oct 9, 2016 at 12:51
  • @Cai: The editor runs in the browser (Javascript), while the "convert to edit" function is a server-side operation. Completely different code. See this post for some insight into the details.
    – Dave Tweed
    Oct 9, 2016 at 13:31
  • Why the downvotes? Is there some good reason NOT to use the inline link format?
    – Dave Tweed
    Oct 9, 2016 at 13:34
  • That post is about code incorrectly being interpreted as links, nothing to do with the convert-to-edit function being server-side. Downvote is because your proposed fix for a bug is to completely remove the (incredibly useful) feature.
    – Cai
    Oct 9, 2016 at 13:36
  • @Cai: What incredibly useful feature? The two formats are merely redundant, as far as I can tell, and I'm not proposing to remove either one. I'm just saying that the post editor should use the first format instead of the second format to insert links and images. What is the downside of doing this?
    – Dave Tweed
    Oct 9, 2016 at 13:38
  • Just because you don't find it useful doesn't mean other people don't. It is a lot easier to work with on longer posts and if the editor didn't do it automatically i would (and do) manually use that format—so this bug would still exist
    – Cai
    Oct 9, 2016 at 13:42
  • 1
    @Cai: That's fine; I'm not trying to stop you. I'm a moderator on EE.SE, where we get a lot of newbies who couldn't care less which format the editor uses, but have a tendency to add supplemental information to their questions as answers, which need to be converted to edits. We run into this bug a lot. I wrote this answer both to bring this issue to the top again since it hasn't gotten any attention in almost two years, and to suggest a workaround that would solve 99% of the cases we run into. If the workaround is no good, then FIX THE BUG ALREADY!
    – Dave Tweed
    Oct 9, 2016 at 13:52
  • Of course, I'm not questioning your intentions and I agree the bug should be fixed. I don't know EE so maybe this would be a more reasonable solution there but I know it wouldn't be in other places. I certainly wouldn't be happy with it anyway.
    – Cai
    Oct 9, 2016 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .