Possible Duplicate:
Bold code in a question

Right now, if I try to bold the text within a code sample, the site simply wraps '**' around the selected text. In other words, I am unable to format any of the text inside my code samples.

It would be very nice if I could be able to highlight parts of the code I post to bring a user's attention to it.

Is this something you would consider adding in the future?

  • See specifically this answer - it looks like a real pain in the example, but if you're not working with angle-bracket-heavy code it isn't such a big deal. – Shog9 Jul 4 '11 at 5:42
  • I can't imagine why you'd want to do this. Bemace's answer gives a good description of the possible pitfalls, but beyond that, I simply can't imagine this being a useful feature. You're allowed to include text above and below the code: please use that to explain where the problem is. And if that's not enough, you can always use inline code comments. – Cody Gray Jul 4 '11 at 8:06

I rather doubt we'll see anything like this. Due to the large number of programming languages that might appear in code samples, it would be very hard to come up with markers for bold or italic text that could never appear in anyone's actual code.

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