1

Please, take a look at this post in SO. I've tried to make some part of the text bold to make the change noticeable. But it doesn't make it bold, instead it just adds leading and trailing **. Here, in meta, it works. Is there something I need to tune in stackoverflow? I've had this problem for at least 3 days.

Here I'm sending you the snapshot in case there's no problem when you view the post.snapshot

  • 1
    None of the SE sites allow markup within a code block, not just SO. I think this is status-by-design. – Ixrec Apr 17 '15 at 6:20
  • Haaaaa, now I get, it. So this is because I'm inside a code block. Ok, I get it. – Mikayil Abdullayev Apr 17 '15 at 6:30
2

This is because Markdown doesn't support text markup inside a code block. A code block is a literal, and won't do any highlighting outside the syntax highlighting.

There is a workaround available though as described in this post. You have to place your code in a <pre><code> block. Since Markdown supports HTML for expanded layout, this will work.

| improve this answer | |
1

Although not possible in Markdown a workaround is to use html.


Source http://meta.stackoverflow.com, answer Highlighting parts of code by brasofilo

It's possible with HTML

1) A code block

Emphasis on this 
<pre><code>Emphasis on <b>this</b>
</code></pre>

---- 2) Inline code: Emphasis on this

Inline code: <code>Emphasis on <b>this</b></code>

Depending on the code, you'd need HTML entities to render it ok.

| improve this answer | |

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