It seems really hard for people to post code that is correctly indented.
Some people post screenshots of code from their editor.
Some people post code where the first line(s) are not indented and so aren’t formatted.
Some people add > to the first line so the whole thing looks like a quote, but then indentation doesn’t really work.
One would have thought that adding one level of indentation in your code editor before pasting would be so easy, but I didn’t think of doing that for ages. I added four spaces to each line manually.
Would it be possible to add github flavoured markdown code blocks? Three backticks on a new line starts the block, and three backticks on an empty line closes the code block. Like this…
unindented code indented code
Oh!?! It works!
Why didn’t I try that before? Because the friggin button for code formatting told me I had to indent everything with four extra spaces.
So, in the interests code readability, would it be possible to change the behaviour of the code formatting button so that it inserts lines with backticks when you select multiple lines of stuff?