I just read Stack Overflow won't let me post code, I don't have proper "formatting"? because I get the same error message. However, all code etc is marked as code in my post, see the screenshot of the preview.

Why does it complain? How do I fix that?

(The main screenshot got a little borked in the middle so I added an extra screenshot of that area)

screenshot of preview

screenshot of borked area

  • You'd be better off asking this on Stack Overflow's Meta. Do search there first in case there are existing questions and answers that can help you. Commented Nov 17, 2020 at 11:29
  • Can you dump the markdown in a Gist on Github? You can also remove everything and then add back what you had one paragraph / block at a time. It might be something simple like adding an extra whiteline or removing chars like quote, double quote etc. Do know that on lost focus the body will be validated so no need to actual push the post button, just hitting tab will be enough to trigger a validation call
    – rene
    Commented Nov 17, 2020 at 11:31
  • @RobertLongson The question is OK here. The code formatting filter is enabled on multiple sites, not only Stack Overflow, so questions about it are on-topic here. Commented Nov 17, 2020 at 11:41
  • @SonictheK-DayHedgehog it certainly is OK here. That doesn't mean it's not better there where there are far more people likely to have encountered this and be able to help. Commented Nov 17, 2020 at 11:42
  • Can you try removing the bulleted lists?
    – Laurel
    Commented Nov 17, 2020 at 13:48
  • 2
    @Laurel I inserted an empty line between the '---' and the xml near the end of the post and then it was accepted. Who would've guessed?
    – d-b
    Commented Nov 17, 2020 at 15:28
  • Oh, markdown is funny like that sometimes. Whenever I get formatting weirdness, adding/removing whitespace fixes the problem most of the time.
    – Mast
    Commented Nov 18, 2020 at 9:49
  • This is / was a well known bug that has been around at least since November 2011. I have described my own experience from it in this comment. The bug has / had nothing at all to do with formatting code. In my example there was no code at all. Commented May 11, 2021 at 16:20


You must log in to answer this question.

Browse other questions tagged .