Possible Duplicate:
Can we enable syntax highlighting for code in comments?

I see that when a user pastes his/her source code in comments, it's not highlighted as separate code with specific format.

What you think, should it be highlighted like source code in the main post? It will be more readable.

  • 2
    Please don't post extended code snippets in comments. It's not only the lack of syntax highlighting, but also the lack of support for line returns that makes it nearly impossible to read. If it's any more than a single logical line, edit your question or post an answer. – Cody Gray Jul 25 '11 at 7:47
  • Why so many negative votes? Don't understand that. – gsharp Jul 25 '11 at 9:28
  • yeah I feel my question not realted..as i am new in meta .. – Afi Jul 25 '11 at 9:59
  • 1
    Welcome to MSO, @Afi! You might be interested in this snippet from an FAQ entry: "On Meta, an upvote indicates 'I like this suggestion' or 'I agree' and a downvote indicates 'I don't like this suggestion' or 'I disagree.' Note that downvotes do not necessarily mean that you have asked a question or given an answer that is poorly-formed. This isn't an official rule, but it has become the de facto accepted community standard." – Pops Jul 25 '11 at 14:59
  • Thanks for explanation! Didn't know that. – gsharp Jul 26 '11 at 10:16
  • Thanks Popular Demand,I got your points – Afi Jul 26 '11 at 11:53

If you're posting the source code in response to your own question, you should edit that code back into the question, and note it as an update.

If you are giving that much detail in a comment, it's probably okay to give it as a full answer, provided it actually answers the question. If, for some reason, it's not applicable as an answer, then it may not be helping the OP anyway. People dealing with exceptions to this can probably tolerate pasting a few lines in with the backticks.

I don't think this situation warrants changing the UI, as comments aren't meant for extended discussion.

  • its ok.I get your point. – Afi Jul 25 '11 at 7:27

I think it is the responsibility of the person who posts the question to properly format any code snippets that it contains.

  • hi gshar you are quite right,but i see some of new user don't have much experience to do properly format.there should be also some expert that can format the comments ..what you say ? – Afi Jul 25 '11 at 7:35
  • well I'm more disappointed/Annoyed about the newbiews. That has no plan about how do put a decent question and don't give back things to community. – gsharp Jul 25 '11 at 9:30

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