Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

I would be grateful if someone tell me what I did wrong when posting my answer.

As you may notice the code is not formatted.


@meta.michael said that there are no line breaks in my code, but look at this screenshot from Notepad++:

enter image description here

so shouldn't the line breaks be copied and pasted to the stacoverflow's window?

Thanks for the help. I've tried to format this code properly for a half an our and I've read the help but I could not make it right.

share|improve this question

marked as duplicate by Martijn Pieters, Shawn Chin, ChrisF, hims056, Nicol Bolas Feb 28 '13 at 12:58

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.

Please have a look at Markdown help. You have not used four spaces to format it as a code and also there is not any line-break in your code. – hims056 Feb 28 '13 at 12:01
It doesn't appear to have any linebreaks in it. After that you'll need to indent each line 4 spaces. Highlight and Ctl-k or click the editor's {} button. – Michael Berkowski Feb 28 '13 at 12:02
I made an attempt at cleaning it up. You mixed plenty of tabs into there as well. Please review. – Martijn Pieters Feb 28 '13 at 12:07
And always view preview while editing code. :) – hims056 Feb 28 '13 at 12:07
Thanks guys for the help. So how should I copy and paste my code safely to the window? I've copied the code that is in the screenshot. @hims056 I was doing that but I could not make it right so I've decided to post it anyway and get help here:) – Wodzu Feb 28 '13 at 12:42

It's all said in the yellow stripe just above the form. Tab Code. So read it:

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four spaces
    will be stripped off, but all other whitespace will be preserved.

    Markdown and HTML are turned off in code blocks:
    <i>This is not italic</i>, and [this is not a link](

To create not a block, but an inline code span, use backticks:

The $ character is just a shortcut for window.jQuery. If you want to have a preformatted block within a list, indent by eight spaces:

1. This is normal text.
2. So is this, but now follows a code block:

        Skip a line and indent eight spaces.
        That's four spaces for the list
        and four to trigger the code block.
share|improve this answer
Thanks for birnging that up. – Wodzu Feb 28 '13 at 12:43

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