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

It is stated in the stackoverflow FAQ: http://chat.stackoverflow.com/faq#formatting

*italic* or _italic_
**bold** or __bold__

so when I type three * followed by a word followed by another three * I expect to see the word to appear to be both italic and bold. Now this is work correctly.

Today I was formatting some message in a chat, I accidentally typed in this:

*this = ***that***

It appeared to read "this = *that" (with 'that' appeared to be bold & italic).

Is this not a bug?

share|improve this question

1 Answer 1

No, that is not a bug.

It is interpreted as such:

*                *
 this = *
         **that**

so the outer stars surround this = ***that** making the whole text italic, bolding that, leaving the one extra asterisk hanging. The text is ambiguous at best; other markdown interpreters may leave the first asterisk hanging instead, like the parser used for posting questions and answers:

*this = that

clearly interpreted as

*this =           
       *        *
        **that**

The Markdown standard doesn't specify how such ambiguous mixing should be handled, both interpretations are equally valid.

If you expected a specific interpretation, use \* to remove a given asterisk from consideration and use HTML tags (<em> for italics, <strong> for bolding) for the emphasis as needed:

*this = \*<strong>that</strong>*

renders as

this = *that

share|improve this answer
    
you mean, HTML <em>in comments</em>? \* renders as *, though, so *escape* –  Jan Dvorak Apr 12 '13 at 16:32
    
@JanDvorak: Comments are a different parser again. –  Martijn Pieters Apr 12 '13 at 16:38
    
Then there's the multi-line chat parser... :-) –  Jan Dvorak Apr 12 '13 at 16:39
    
@JanDvorak: The multi-line parser assumes no formatting, unless you indent 4 spaces, at which point it always formats with <pre>. –  Martijn Pieters Apr 12 '13 at 16:40

You must log in to answer this question.

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