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.

This question already has an answer here:

It's annoying that on stack overflow ` ` works fine in questions and answers but not in comments, to produce a single code-formatted space.

Edit a few days later

Actually my question appears to be a duplicate of Markdown in comments: Inline code section does not format correctly if it contains only white-space which is marked as a duplicate of My comment `code block` was not converted properly, is this a bug? which in turn cites a comment by Jeff which is apparently no longer visible in the thread at Recent change of inline code in comments leads to mistakes in old comments

The duplicate-spotting code didn't locate these initially but some of the people who edited my question and/or posted relevant answers managed to include enough material to make the duplicate-spotter suggest it in the right sidebar.

So now it's all as clear as mud to me.

share|improve this question

marked as duplicate by Sklivvz Apr 9 '13 at 9:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Test: It's annoying that ` ` works fine in questions and answers but not in commas. –  Mysticial Apr 5 '13 at 16:08
    
meta seems to behave differently - meta doesn't do code formatting? –  drquicksilver Apr 5 '13 at 16:09
    
Yes it does. It should be the same as on SO. –  Mysticial Apr 5 '13 at 16:09
    
stackoverflow.com/questions/15836321/… direct link (I hope) to the comment with the single spaces which don't work, the answer above has working ones. –  drquicksilver Apr 5 '13 at 16:10
    
It works for me. Can someone please explain how to repro? –  djechlin Apr 5 '13 at 16:12
    
IMO you should explicitly type out "space" to make your sentence easier to read, either in the answer or the comment. –  Wooble Apr 5 '13 at 16:12
    
Test leading space ​ lead, test trailing space trail . Space . –  nhahtdh Apr 5 '13 at 16:14
    
Perhaps. But code-formatted single characters are quite a natural way to discuss analysis of strings character by character and programming languages with special symbols. Anyone the point of my question is the difference between comment and Q&A, not the feature's existence at all. –  drquicksilver Apr 5 '13 at 16:16

1 Answer 1

It is certainly annoying not being able to properly codify leading space, trailing space, repeating space, and space as the only character within backticks in comment.

It is possible to force codification when the text within backticks starts with spaces in comment, by putting an invisible leading character Zero-Width Space U+200B before the leading space. (No Break Space U+00A0 does not work here).

In post, the codification happens when there is leading space, but no leading space is preserved. To workaround, you only need to use No Break Space U+00A0 as the leading space.

It is possible to force retention of repeating spaces and trailing spaces (in both post and comment), by using No Break Space U+00A0.

share|improve this answer
    
As demo, ​ leading space, only space ​         , repeating        spaces with trailing spaces         . –  nhahtdh Apr 5 '13 at 16:30
2  
Thanks. Useful (but fiddly) workaround. Of course I understand that comments are intended to only support a subset of the markdown supported by the posts, but this particular difference just seems odd to me. –  drquicksilver Apr 8 '13 at 12:54

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