What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

When responding to potential answers I sometimes like to include a code block to clarify what I'm talking about. Is it possible to have clean code-formatting in comments or only in questions and answers?

share|improve this question
3  
You can do inline code in comments, but block-formatting is reserved for questions and answers. See: meta.stackexchange.com/questions/197/… –  Shogging through the snow Feb 12 '10 at 18:53
1  
also see meta.stackexchange.com/questions/1149/… –  Ether Feb 12 '10 at 19:38
1  
Something like this? (`Something like this`?) –  Greg Bacon Feb 12 '10 at 19:53
    
So I suppose the answerer in this question is using some other kind of html markup injection? stackoverflow.com/questions/2643150/… –  Anderson Mar 23 '11 at 6:00

4 Answers 4

I haven't seen this as possible. The best you can do is use the back_tick to shade the code. That's why you don't see much in the way of code-blocks in comments. Only small references to specific pieces within a given answer

share|improve this answer
    
the next text should be different yes it ? starting now >> code –  sirnur Apr 24 '13 at 17:38
    
When did code quit working on stack-overflow? –  ebyrob Apr 28 at 20:05

Comments, by design, are intended to convey brevity. If you have a code-block that you need to bring attention to, append onto your original post beneath a title like Update #2, and then reference it from within a comment if you need to.

If you have small inline examples, you can just wrap them in back-ticks ` var foo = bar.

share|improve this answer

Yea this is possible. See this answer.

Code Formating in Comments

share|improve this answer

You mean this or something more like multiple lines?

if you refer to inline coding, It's done with enclosing text with `, otherwise you can't

share|improve this answer
    
Something like this: int a = 1 –  jmfsg Feb 12 '10 at 18:55
    
this is bold ' this should be coe formate'. –  sirnur Apr 24 '13 at 17:45

You must log in to answer this question.

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