Curly quotes are the least of your problems; all indentation is stripped
Ideally, users would use code blocks correctly (as is suggested when they try to post), but if you want to try to help someone who didn’t, you can get the raw text of their post by replacing /t/whatever-the-topic-slug-is/ portion of the URL with /raw/: see your post at https://discuss.python.org/raw/20904.
Personally, I wish that view was made more easily findable; as far as I know, there’s no way to reach it via the UI, but instead manual URL manipulation is required.
Given that unformatted code would still unusable (indentation, etc), I don’t see what benefit removing the nice formatting from non-code test offers. Personally I just refuse to spend effort on questions until/unless code gets formatted.
Supposedly there was a plugin installed that would try to detect unformatted code, and pop up a modal dialog to prompt the user to correct it, but if so, it does not seem to be very successful. Does Discourse have a an mandatory onboarding flow that could be enabled? e.g. show new users how to make a formatted code block, and make them literally type one in correctly in some dialog before they are allowed to post for the first time?
The lost indentation is a bigger problem, but also harder to do anything about. The quotation marks are a hurdle, albeit minor, and if possible I don’t see the downside to removing it. IMO the typographic benefits of curly quotation marks over straight are minor at best.
That’s very useful, thanks!
This would perhaps be the ideal solution. Such a plugin doesn’t seem to exist, unfortunately.
Meanwhile it could be helpful to create a post just about the code formatting in the welcome category and pin it there:
Then we can link it for newcomers when needed instead of writing the same instructions again and again.
I have added a section to the already pinned Quick Start message:
…but I think the section gets lost in the relatively long message and when I link the section of the message it shows the beginning of the message in the preview, not the linked section. You can see the useless preview above.