code span doesn't preserve space

David Parsons orc at pell.portland.or.us
Wed Feb 9 11:20:41 EST 2011



On Feb 9, 2011, at 5:29 AM, weakish wrote:


> Consider this code span: `grep ' '`. All implementations listed on

> [babelmark](http://babelmark.bobtfish.net) just simply wrap it as:

>

> <code>grep ' '</code>

>

> Viewed in browsers, the above code is equivalent to:

>

> <code>grep ' '</code>

>

> I think spaces should be preserved in code span,which maintains

> consistence

> with code block. For example, the following HTML code:

>

> <code>grep '&nbsp;&nbsp;&nbsp; '</code>


If you don't use css to style the spaces, &nbsp; may not help.
In the
versions of firefox I use, the stupid browser happily compresses
&nbsp;
no matter how many <code>s and <pre>s I wrap around them.

-david parsons


More information about the Markdown-Discuss mailing list