1

When I was reviewing suggested edits lately, I come across a user who put code formatting around every language and control that is mentioned in a post. They also added white-spaces after lots of the sentences. I had always thought that languages and generic control names (such as buttons) shouldn't have code formatting around them (because for one thing, the post gets very messy), so I rejected the edits. However, three other users approved them.

I read this post, and it seems like code languages and generic control names shouldn't have code formatting.

So should the above edit have been rejected?
Or was this proper use of formatting?

2
  • @rene, I rephrased my question to be more clear about what I was asking.
    – davidsbro
    Commented Jun 22, 2014 at 13:37
  • I saw that and still feel the answers on the dup qualify as answers here.
    – rene
    Commented Jun 22, 2014 at 13:40

1 Answer 1

6

Language names (like PHP, C#, HTML, CSS, JavaScript) are almost never candidates for code formatting, because they are proper nouns, just like Alice and Bob and Stack Overflow.

Generic control names that are simply part of natural language sentences should not be code-formatted either. Only when it's the name of an identifier in code should it be code-formatted, for example a Button class or a TextBox class.

That edit should not have been approved. The only part of the post where inline code formatting was appropriate was $(document).ready, but since it's an extremely minor edit and certainly one the post could live without, the editor should have just refrained from editing the post altogether.

0

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