Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

I would like to suggest a feature change with text formatting.

There have been several instances where I would like to point out something in someone's code. It would be much easier to do if text within inline and block code could be set to bold to highlight something in particular.

I've noticed other users who have had problems with this sort of thing and I think it would make things a lot easier if this was possible.

Here is one recent example:

using jquery autoNumeric plug-in with multiple fields

Specifically the answer by David where he says:

Pardon the ugly formatting, not sure the best way to call attention to it in a code block.

share|improve this question

marked as duplicate by Asad Saeeduddin, Yi Jiang, hims056, Al E., Lance Roberts Feb 12 '13 at 1:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 12 down vote accepted

You can use a <pre><code>...</code></pre> block instead, and the HTML tags to bold (remembering to escape special characters, though):

<pre><code>function changeMe() {
    console.<del>write</del><b>log</b>('Hello, world!');
}</code></pre>

becomes

function changeMe() {
    console.writelog('Hello, world!');
}

But in regular Markdown? That would seem like a bad idea, considering the multiplication and exponentiation operators in many languages.

share|improve this answer
    
This gets extremely tedious when you have < in the code section. (xml and html have tons of these.) Each one needs to be replaced with &lt;. – Pacerier Sep 21 '15 at 8:36

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