59

I posted a code example in C with square brackets and ones (accessing element at indexes 1, 1 in a 2D array; here is a link to my answer). Once I pasted a link using the bar button, however, my code example got changed (here is a link to the edit). There were two additional URLs number 2 and 3, pointing to the link of my first example. I caught that, and removed these two URLs, but I missed the changes made to my code.

To fix this bug, the code that renumbers URLs should ignore everything formatted as code.

The bug is easy to reproduce:

  • In a new answer window type and highlight a word "Link"
  • Highlight the word "Link", and click the [link] button in the tool bar
  • In the dialog that opens type http://www.google.com; close the dialog
  • Your screen should look like this:first link
  • In the space between the link and the list of URLs type a code example that looks like this: int a[1][1];. Indent by four spaces to format it as code
  • Type another word "Link" under your code.
  • Highlight the second "Link", and click the [link] button in the tool bar
  • In the dialog that opens type http://www.yahoo.com; close the dialog
  • Now your screen should look like this:second link

Note how the code got changed from a[1][1] to a[1][2], and an extra URL at number 2 got added to the list.

8
  • 11
    Simple: Don't use the button to insert links :-) (Yes, I agree with you, needs to be fixed.) May 23, 2015 at 14:09
  • 3
    @JonasCz: Well, for pictures you are just about stuck with them, if you want to upload them automatically. May 23, 2015 at 15:27
  • 3
    I think there is also an issue when adding an image to a post that already has numbered links. May 23, 2015 at 16:29
  • @Deduplicator, If it affects pictures too, then I agree, it's really a problem. May 23, 2015 at 16:32
  • Note that the bug is also present when using the keyboard shortcut (ctrl L) to insert the links. May 24, 2015 at 18:16
  • I believe this is well-known. There should be an already opened question on meta so or meta se.
    – Bakuriu
    May 25, 2015 at 8:27
  • I've met this before meta.stackoverflow.com/q/276293/960757. And it's really a kind of thing that might seriously break your answer. @Brock, it happens only if you use that link dialog.
    – TLama
    May 25, 2015 at 9:42
  • Even simpler, don't use multidimensional arrays :D May 26, 2015 at 1:05

1 Answer 1

6

This is fixed in the next build; for details see my answer on Meta.SE.

You must log in to answer this question.

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