I am trying in one of my posts to do this:

***how many*** **and** ***where***

Which for some reason comes out like this:

***how many*** **and** ***where***

Why is that happening?

Shouldn't the middle word be bold?

Is this for markdown or is it (as I assume) a ?

  • 13
    "I am trying in one of my posts to do this". I pity the site you're posting on – Michael Mrozek Mar 21 '12 at 14:00
  • @TimStone Hmm. Why does an extra space work? – Michael Mrozek Mar 21 '12 at 14:01
  • @TimStone well for one thing, I did not know I could do that (your second option). – Naftali aka Neal Mar 21 '12 at 14:02
  • 1
    Why not simply mix and match the asterisks and underscores? – Lix Mar 21 '12 at 14:11
  • @Lix I tried that, It doesn't work, the same thing happens. – Naftali aka Neal Mar 21 '12 at 14:12
  • 5
    Why not simply refrain from doing this at all? – Grant Thomas Mar 21 '12 at 15:03
  • Daring Fireball's perl implementation produces the expected result, so this is a bug. How urgent a bug is up for debate :) – Jarrod Dixon Mar 22 '12 at 2:51
  • 6
    What a ridiculous reaction from the community, honestly. "Just don't do it"? "Pity the site you're posting on"? Imagine if your word processor didn't allow you to mix bold and italics like this, and its developer just told you "Are you seriously trying to use such formatting in your document? Just don't!" – RomanSt Mar 25 '13 at 20:31
  • It's not really "the community", though, just Michael Mrozek wasting everyone's time with the statement he made. – shevy Mar 23 '19 at 12:30

The obvious answer is to just not do that, but if you're that intent on it, try one of the following ways:

***bold italic* bold *bold italic***

bold italic bold bold italic

***bold italic***  **bold** ***bold italic***

bold italic bold bold italic

**_bold italic_ bold _bold italic_** // for the "prettier" HTML

bold italic bold bold italic

To satiate Michael Mrozek's curiosity, the extra space works because the strict bold-italic parser needs a space (or other non-word character) to match, and the first bold italic group gobbles the single space you had there originally, depriving the bold group of it. As a result only the italics group that's a subset of the bold group (that is, the *and* within the **and**) matches.

  • As a side note, the actual processing works a little differently in each case, but I'm not sure if anyone cares about it to that extent. – Tim Stone Mar 21 '12 at 14:29
  • The first one makes more sense. It's almost like... simplifying programming logic. :o No way! – animuson Mar 21 '12 at 14:58
  • @animuson The last one produces the nicest HTML though, I suppose. – Tim Stone Mar 21 '12 at 16:16

bold italic bold bold italic

***bold italic***  **bold** ***bold italic***

Notice the extra space between the 1st bold italic and the bold sections.

  • Ahh but that is not what I want. sorry the title did not match the OP. read the OP! :-P – Naftali aka Neal Mar 21 '12 at 14:09
  • @ChrisF -- why should I need to make the extra space? – Naftali aka Neal Mar 21 '12 at 14:13
  • 1
    @amanaPlanaCAnalPAnaMA - no idea, but it works :) – ChrisF Mar 21 '12 at 14:13
  • @ChrisF So basically my way is bydesign? – Naftali aka Neal Mar 21 '12 at 14:13
  • 1
    @amanaPlanaCAnalPAnaMA - No idea. – ChrisF Mar 21 '12 at 14:14
  • @ChrisF odd. hmm – Naftali aka Neal Mar 21 '12 at 14:14

This is fixed in the next build.

Server: https://code.google.com/p/markdownsharp/source/detail?r=6f4eabfa291169c1c0969d80a20eb6c2f202e35d

Client: https://code.google.com/p/pagedown/source/detail?r=ec83ecf78c0c01ab8725c0b9614b9af6c4f6ecf5

You must log in to answer this question.

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