4

I recently posted a question to Code Review and I was getting the error “Your post appears to contain code that is not properly formatted as code” even though all my code was in code blocks. By deleting portions of my post to see where the error was arising, I narrowed it down to where I defined the link references, as shown below:

[link1]: http://www.examplesite1.com
[link2]: http://www.examplesite2.com
[link3]: http://www.examplesite3.com
[link4]: http://www.examplesite4.com
[link5]: http://www.examplesite5.com
[link6]: http://www.examplesite6.com

The problem was solved by changing all the link references to follow another naming convention, like this:

[1]: http://www.examplesite1.com
[2]: http://www.examplesite2.com
[3]: http://www.examplesite3.com
[4]: http://www.examplesite4.com
[5]: http://www.examplesite5.com
[6]: http://www.examplesite6.com

Any ideas what's going on here? I am befuddled.

1

That is a known quirk of that quality check.

I didn't notice it in this form though. I don't know the root-cause but this is a similar example of a false positive:

error not properly formatted code

The pattern I now see emerge is the use of opening and closing brackets outside a code block at the start of a new line.

In the above example I added headings above each image.

In your case you could have done this:

- [link1][1]  
- [link2][2]  
- [link3][3]   
- [link4][4] 

to make them in a proper list. If the quality control check really doesn't give in you can fallback by simply putting the plain html in place.

<a href="http://example.com">Link1</a>

The advice is to not start a line with opening and closing brackets to prevent the error

Your post appears to contain code that is not properly formatted as code.

Either use a list, add a heading between the lines or use plain html markup.

Do notice that [1]: http://link.com is a valid markdown construct. It is used to have a set of links at the bottom of the post and only reference to them with the number. That probably explains why that formatting didn't trigger the error.

  • Curiously, none of my links were at the beginning of a line. They were all within paragraphs. The only places where I used brackets at the start of a line was where I defined the link references. Your fix would make a lot more sense, but what I actually did was just change the text used for the link references. I'll edit my question to make it more clear. – Jeremy Caron Feb 8 '16 at 20:41

You must log in to answer this question.

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