Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't get code to post in a question - it "appears" there is unformatted code but there is not

Tags:

markdown

I have spent almost two hours creating a new question, trying to provide helpful information and code - I couldn't use a code sandbox because sqlalchemy and flask are not available on codesandbox.com as dependencies.

When I get to the "review" step of my post, I get an error that says:

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.

Of course the key word here is "appears". There are about a half-dozen code blocks but they're all formatted correctly. I've tried using three tick fences, tried using control-k to format the 4 spaces, tried using both methods together, and I keep getting the error. There's not enough detail in the error to tell exactly where the stackoverflow code thinks there is unformatted code.

Any suggestions on how to get past this error?

like image 762
Dale Avatar asked Mar 03 '23 02:03

Dale


1 Answers

Solution was that there was an error message that I put in a blockquote - after all, it wasn't code; it was an error message. The stackoverflow code interpreted the error message as code. I changed it from a blockquote block to a code block and it appears I could post the message now - but now I'm up against a limit that I can only post once in 90 minutes so this question is blocking me from posting the real question.

Just a suggestion to the admins: blockquoted segments should not be checked by the code validator.

like image 57
Dale Avatar answered Mar 04 '23 16:03

Dale