I initially noticed this when I posted this comment: How can I sort a document according to a substring in each line on Win7?

The first fixed-width section is not properly resolved. After a bit of testing, I concluded that whitespace is to be blamed for the behavior.

This will be converted just fine:

  • ,#

These won't:

  • #
  • #

Markdown Source

enter image description here

So much for the comments, but additionally, this is how the markdown section above is previewed below right now: enter image description here


I had the same problem yesterday: A leading space in inline code breaks the comment's Markdown. I suppose that's intentional (to prevent circumventing the 15 character limit).

To produce ​ # in comments, you can place the Unicode character U+200B (Zero-width space) right after the first backtick:

`[U+200B] #`

How to type the U+200B character:

  • Windows:

    • Alt+Num8Num2Num0Num3

    • Alt+Num+200B

      (if HKCU\Control Panel\Input Method\EnableHexNumpad is set to REG_SZ:1)

  • Linux:

    • Ctrl+Shift+U200B
  • 1
    Proof that it works: ​ # – Dennis Sep 21 '12 at 13:35
  • 2
    Time to set EnableHexNumpad... – Der Hochstapler Sep 21 '12 at 13:43
  • If I type Alt+8203, I get ♂ – Der Hochstapler Sep 21 '12 at 21:51
  • 1
    @OliverSalzburg: Poor Unicode support. For reasons I could never fully understand, some applications only allow you to input ASCII characters. Since 8203 % 256 = 11, you get the vertical tab character (ASCII 11). In Chrome (for example), both methods work just fine in the address bar, but you have to use the hexadecimal version in input fields and text areas. The rationale behind this is beyond me... Related: Why does [ALT+224] return Ó instead of alpha? – Dennis Sep 21 '12 at 22:13
  • Awesome. Thanks :) – Der Hochstapler Sep 21 '12 at 22:22

As with standard markdown, leading and trailing spaces are removed when rendering inline code.

If you insists on adding those spaces, you can use the NO-BREAK SPACE character in place of spaces. Example:

  •  #
  •    #

You can also do this by writing your own HTML:

  •  #
  •     #

(written as such)

 * <code>&nbsp;#</code>
 * <code>&nbsp;&nbsp;&nbsp;&nbsp;#</code>

P.S. I vaguely recall the former working with comments as well but a quick test shows that it no longer does :(

  • I couldn't make it work in the original comment. The NBSP has the same effect as the regular space. Thanks for the suggestions though ;) – Der Hochstapler Sep 21 '12 at 13:29

You must log in to answer this question.

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