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

In my comment here:

What is your favorite Coding Guidelines Checklist?

I needed to have a : symbol with a leading space, but I couldn't figure out how to get it. And for some reason it converts differently in this question to how it would in a comment - as you can see, in the comment box ` :` wasn't turned into code block at all. Is it impossible, by design, to have leading or trailing space in a codeblock?

share|improve this question
testing ` :` 123 ``` :``` – wim Sep 7 '11 at 1:55
Very interesting. – Matthew Read Sep 7 '11 at 2:00
Comments use a different Markdown "mini" parser, which explains how there's a difference, but I can't imagine this is by design. It actually causes an obscure bug in chat as well, since the client-side Markdown mini parser converts it as expected, only to have the server-side parser switch it back to its raw-text form. – Tim Stone Sep 7 '11 at 2:03
Oh, interesting. : and ` :`... Seems that only the leading space case doesn't work - the former works as expected. – Nightfirecat Sep 7 '11 at 3:37
testing ` untrimmed` trimmed – genesis Sep 7 '11 at 12:22
Thanks for the heads up. Closed as not constructive. Snake! – Won't Sep 7 '11 at 14:16

1 Answer 1

up vote 9 down vote accepted

Citing Jeff's first comment to this answer about inline code in comments:

Spaces are not allowed as the start or end character in inline code blocks now. Do not include them, or it won't work.

That said, as a workaround you can put a zero-width unicode character '‍' (yeah, it's right there between the apostrophes) at the start of your inline code; then you can put a space after that character. Note, however, that what looks like a zero-width character to you may appear to be some odd character to them. Moreover, if people copy-and-paste that code from your comment, they may catch the zero-width character without noticing.

So in your case, putting `‍ :` in the comment should work (tested below).

share|improve this answer
To demonstrate that it works: ‍ : – Hendrik Vogt Sep 7 '11 at 12:47

You must log in to answer this question.

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