I mean this edit, but I've seen it happen couple of times already. Is it OK to put URLs in code block? For me if it's a list of addresses, it should be formatted as a list. I might understand formatting it as a list with just URLs in `code ticks` all right, but is there any real benefit of putting it all in a code block? and shouldn't it be rejected as to minor even if not as invalid?

1 Answer 1


The only case where URLs should be put in code blocks is when they are absolute URLs, and the domain is localhost, or similar.

In the specific case, I don't see the reason for converting the list into a code block, since there wasn't any character that needed to be escaped, such as in the case of this-is-a-<url>-that-needs-to-be-escaped, which without escaping would be rendered as this-is-a--that-needs-to-be-escaped.
The suggested edit didn't improve the formatting at all, and it should have been declined.

Converting the list in a code block had also the effect of highlighting random characters, since the syntax highlighter was not able to guess the syntax highlighting language to apply. That could have been fixed by adding a <!-- language: lang-none --> line before the code block.

You must log in to answer this question.

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