As encouraged by Nathan I will also put my proposal here.
It was already mentioned in the comments but finally an option to auto-indent/beautify code would be more than welcome outside the snippet editor. I am going to copy-and-paste some text from my other post:
Many of my edits on SO are merely formatting improvements. Adding newlines and indents is what I do at night. However, I wonder if it's possible to automate the process. Especially people who are new to SO and/or the language at hand seem to not bother about a readable code block. However, for us - the people trying to help - it is quite the effort to first make the code readable and then trying to answer the question.
As I see it there are two options, either immediately beautify code as soon as some one uses the Code Sample button in the toolbar, or add a Beautify Code to the toolbar. Beautifying should only be allowed on code snippets.
I understand that an implementation might take some weeks or months to roll out, but there are many tools availablemany tools available exactly for this.
For some people this might seem as a silly problem, but users who are active in the webdev department should have encountered this problem many times before. Personally I especially notice this in the sass, css, html, xml, js, php, json categories.