I have seen editing help, but I couldn't find how to add a space to the code snippet.
For example, this :
1
2
3
Should look like this (1 space in the last line) :
1
_2
_3
_
So, how do I add a line with only spaces in the code?
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communityI have seen editing help, but I couldn't find how to add a space to the code snippet.
For example, this :
1
2
3
Should look like this (1 space in the last line) :
1
_2
_3
_
So, how do I add a line with only spaces in the code?
You can do that using the HTML tags <pre><code>
instead of indentation by 4 spaces:
<pre><code>1
2
3
</code></pre>
will give
1
2
3
Since you're using this for formatting output, you probably don't want syntax highlighting anyway; then you should omit the <code>
and </code>
tags. (Kinda obvious: don't use 'em if it ain't code.)
Enter a non-breaking space - not the
version, the proper unicode version - after four normal spaces and the result is:
1
2
3
On Windows you enter this with Alt + ( Keypad 0, Keypad 1, Keypad 6, Keypad 0 ).
On Mac OS X you enter this with Alt + Space.
Unfortunately, I don't know how to enter it directly on Linux...