0

I want to post ' ' with 4 spaces between the tick marks, but the markup languages removes them. I tried inline code but that didn't help. How can I do that without using the Code button?

3
Contributors
9
Replies
10
Views
5 Years
Discussion Span
Last Post by Dani
0

You're right. I forgot that inline code strips excessive whitespace. :( It's the HTML standard.

0

According to this html should display   as a space

Test: "    "

Test failed.

Therefore, DaniWeb-flavored Markdown currently does not allow any HTML. Both HTML tags and entities will not be parsed.

Edited by Ancient Dragon

0

If I wanted to fix this "bug", then on the server-side we could replace all spaces within inline code with  . However, I don't think I want to do that since it would go against the W3C's standard that inline code collapses whitespace.

0

How about if poster wants white space untouched then just use   but that would have to be an exception to your rule of no html. How is it done when Code ? Shouldn't inline code behave the same?

Edited by Ancient Dragon

0

Inline code is generated by using the HTML tag <code></code>. According to the HTML standard, the code tag does not preserve whitespace.

Code blocks are generated by wrapping the code tags with preformatted text tags, which are used to preserve formatting and whitespace. Therefore, code blocks are generated using the HTML tag <pre><code>...</code></pre>, as explicitely recommended by Google.

One of the most important features of the Markdown language is its cleanness and cut-and-dry separation of context and formatting. Therefore, using &nbsp; for formatting/design reasons actually goes directly against both the W3C's guidelines for HTML 5 and proper SEO guidelines.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.