30

I'm asking a question on Stack Overflow and having my code fully formatted as they said, yet I received this error when posting it:

Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.

I really don't know what is wrong. All my code is beautifully in its place in the preview, there's no missing parts, and they tell me my code is bad-formatted?

Here is the picture of how it looks. All my code stays as in the picture:

error

Picture of the question detail: detail

Full question in text
(note: no need to attempt to post the content with a high reputation account, it has already been tried by Cœur and by Kit, so the filter may possibly be for newly welcomed users only)

23
  • 1
    Could you add the complete markup of the question here? For example as a code block? Is there any other content in the question besides the code block?
    – BDL
    Nov 3, 2018 at 22:26
  • 4
    Use pastebin or gist.github.com to paste your entire post so we can test it.
    – ias
    Nov 4, 2018 at 0:50
  • 11
    Is there anything else in the question? It doesn’t consist solely of code, does it? (That would also be bad…) You may be tripping up some other quality check and the error message is simply the wrong one.
    – deceze Mod
    Nov 4, 2018 at 2:27
  • 1
    Yes of course the question is not just code. I've added the question detail and the full question in text above Nov 4, 2018 at 10:04
  • 3
    The quality checker might be tripped up by how you are formatting your errors. That's the only thing I see that kinda-sorta looks like code but isn't formatted as code. Nov 4, 2018 at 10:06
  • 1
    @Jörg W Mittag: That does seem most likely. Considering most error messages for most languages and REPLs are printed in the console I'm starting to think we should all stop formatting messages as quotations (in fact, in HTML, <output> is more appropriate than <blockquote>).
    – BoltClock
    Nov 4, 2018 at 10:51
  • 3
    @BoltClock: Unfortunately, there is no good way on Stack Exchange to format console output. I am flipping back and forth between code and <pre> myself. Nov 4, 2018 at 10:59
  • 1
    @BoltClock <output> needs to be added to the allowed html tags then ....
    – rene
    Nov 4, 2018 at 11:28
  • I thought the consensus was to format error code as code anyway: meta.stackoverflow.com/questions/286706/…
    – BSMP
    Nov 5, 2018 at 3:31
  • I can't seem to reproduce your issue with the text you put on pastebin. Maybe it depends on the question title too? Maybe it depends on the tags too? Maybe it depends on the user reputation?
    – Cœur
    Nov 5, 2018 at 6:31
  • My title contains the double-quote mark, could that be the problem? Nov 5, 2018 at 6:35
  • 8
    @BrotherEye please attempt the following: post your question, but only with the first paragraph. Then edit it, add the error message, then edit it and add the code. Proceeding step by step, it will either work or you'll have a better understanding of what is the issue. And if you're blocked from editing in a given format (quote, code), then format it differently (code, quote) or mixed and let someone else with more than 2000 reputation fix the edit after you. To clarify why you had to do an improper formatting, you may link to this meta discussion in a comment.
    – Cœur
    Nov 5, 2018 at 14:50
  • 1
    Could it be due to the error message that you've added in a quote? Maybe SO incorrectly detects this as code, which triggers the block.
    – laurent
    Nov 6, 2018 at 9:56
  • 1
    Did you try to discard your draft and copy it yourself from pastebin? I had this once, fat finger resulted in some sort of unwanted white-space character I guess, never found out what exactly was the case.
    – Darkonaut
    Nov 6, 2018 at 18:22
  • 1
    @Izkata in my own test two days ago, I had re-added the backticks before attempting. My guess is that there is a threshold of reputation (like 100 or 2000) under which the filter kicks in.
    – Cœur
    Nov 7, 2018 at 4:40

0

You must log in to answer this question.

Browse other questions tagged .