Often I see code blocks pasted into questions with no formatting, or terrible formatting.
It's sometimes quite a chore to fix these: you have to either manually space out each line, or paste the code into an IDE, format it there, and paste it back.
Could we have a button/function where you could highlight a code block, and it would turn this:
foreach (var i in stuff) {
if (i==1) {
Whatever();
}
}
into this:
foreach (var i in stuff) {
if (i==1) {
Whatever();
}
}
I realise the function would have to work differently based on the language in the code block. Perhaps it could use the same rules as the prettify code.
Also, it wouldn't be a big deal if it gets the language wrong and breaks the code, since you can always just ctrl+z.