So, there's two components to this: Markdown, and the Markdown editor. You're running into trouble with the latter.
In Markdown, links have two styles (and images are just the same, only with a !
before the [
):
[link title](http://some.link/here)
[link title][linkref]
, where you can put in a [linkref]: http://some.link/here
afterwards. (Note: linkref
can be any identifier, it doesn't have to be numeric.)
The second style is useful where the same link is going to be used in multiple places in the document, and/or to keep the main text body uncluttered.
In the Stack Exchange Markdown editor, when you insert a link or image, it uses the second style, with numeric link references. This is because it doesn't know of a better name to use. It does not mean you have to stick with numeric link references. Just change the link references to non-numeric ones (and not colliding with other bracketed entities in your code), and it won't interfere with your code any more.
Personally, I almost always use the first style, then there aren't even any link references to worry about.