I composed a question on Stack Overflow which had lots of text. I tried to format it, mostly using <pre> tags but was unable to post it. The website gave the warning that my post contains improperly formatted code.

To seek any guidance on how to properly format it I tried to post the same question with the whole body blockquoted but then I got another warning - This looks like spam.

So I'm putting my question body up on pastebin for any guidance I can get.

  • @iLuvLogix Why exaclty? I can't see how this is spam? – πάντα ῥεῖ May 2 '19 at 11:54
  • 3
    @iLuvLogix why spam? Pastebin is often used ... – Glorfindel May 2 '19 at 11:54
  • @Glorfindel Why mention it at all? It doesnt add any relevant info to the question.. – iLuvLogix May 2 '19 at 11:54
  • @πάνταῥεῖ & Glorfindel - I retracted my spam-flag – iLuvLogix May 2 '19 at 11:56
  • @iLuvLogix i mentioned it as the question body which is what this question is all about is shared there. I tried to share that question body here but as i have mentioned in the question, it was flagged as spam. – Vicky Singh May 2 '19 at 12:00
  • @VickySingh Have you tried asking the question why you got those msgs on SOmeta? – iLuvLogix May 2 '19 at 12:02
  • Why the down votes ? I have spent time to figure it out on myself and when i could't find a way i posted it here. Even if the warnings given by stackoverflow were more detailed or atleast pointed to the culprit line it would have been very helpful. – Vicky Singh May 2 '19 at 12:02
  • @VickySingh You might want to try reading related Q&A's at Stack Overflow's Meta (and not here). Down votes here work differently than other sites. A request that the Edit Window on Stack Overflow should be more helpful ought to be asked there since it is specific to that site, and not either this one or multiple sites. – Rob May 2 '19 at 17:27
  • welcome to meta! still having trouble? perhaps it's the ip address, which appears many times? i would also reduce the ratio of code to text, repeated returns, and extremely long lines. ~ edit: oh, after trying the version rene posted via their git, it's linked under glorfindel's answer! – ocæon May 3 '19 at 22:57

I'm not sure why <pre> isn't working for you; it works for me, but maybe the quality checks on this site are different; it probably even matters if you're posting a question or an answer, and what your reputation is (though with 181 reputation you're not brand new). Anyway, you can try to use 'Code Sample' mode instead (Ctrl + K works, or the curly braces {} in the editor toolbar). It's a lot cleaner, especially with many code blocks as in your question.

If the system still complains about spam, try to add some more text. I wouldn't recommend to do this often, but you can even try to add a paragraph consisting of repeated &nbsp; characters at the end. (That's way better than the endless string of dots or x-es other people sometimes use.)

| improve this answer | |
  • I will definitely give 'Code Sample' mode a try .Thank you. – Vicky Singh May 2 '19 at 12:08
  • Aren't quality checks also reputation dependent? – rene May 2 '19 at 12:22
  • Probably, yes, but the author has 181 reputation, so they're not brand new anymore .... – Glorfindel May 2 '19 at 12:25
  • Yeah, I just tested with my sock with 1 rep and I do get the 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 error with the raw content of the post. With my own account I don't get that error. – rene May 2 '19 at 13:48
  • 2

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