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

Here's the screenshot of my experience with italic text over Stack Overflow.


Basically it just wraps the word into asterisks and leaves it like this. Here on Meta I do not observe this bug.

share|improve this question
It's because underscore _ also delimits italic. _italic_ -> italic – ChrisF Jan 21 '12 at 13:51
As a workaround for @Chris' comment: use *unique\_names* or _unique\_names_ instead. (So: escape using a backslash.) I wonder if this is expected behavior though! – Arjan Jan 21 '12 at 13:57
*unique\_names* -> unique_names (just to prove it works) – ChrisF Jan 21 '12 at 13:58
For me, it's the same on Meta. – Arjan Jan 21 '12 at 13:59
Are you sure about your "Here on Meta I do not observe this bug"? – Arjan Jan 22 '12 at 15:43
up vote 15 down vote accepted

As ChrisF said, the problem is the underscore. _ is a control character, and control characters might behave differently from what you expect.

Just escape the underscore (\_) and it will work:


results in


share|improve this answer
Still, I wonder if this is expected. On SE sites, emphasis within a word (intra-word emphasis) is explicitly disabled, to avoid emphasis of dear in hello_dear_world. That said, maybe the expected behavior is that asterisks and underscores in words are totally ignored, and escaping would not be needed? – Arjan Jan 21 '12 at 14:04
The current behavior is certainly not what I would expect. For starters, *_* results in an italic underscore. – Dennis Jan 21 '12 at 14:11
Hehe, I hope you had to peek into the HTML source to tell that the underscore is (told to be) rendered italic for *_*? Spot the difference: _ versus _ ;-) – Arjan Jan 21 '12 at 14:14
So you can't tell the difference? – Dennis Jan 21 '12 at 14:25
I even zoomed in, but: no. :-) – Arjan Jan 21 '12 at 16:37

Is this a discrepancy between the JavaScript preview and the rendered post? Let's see:


No, so they are at least consistent.

I agree it's not exactly what I would expect to happen.


provides a similar but .. more logical .. result as we disable intra-word emphasis, so perhaps the regex just treats *_ as part of the same character group.

share|improve this answer

You must log in to answer this question.

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