I don't think that the user you've posted about did much of anything wrong at all
all he really did was add formatting and fixed a trivial syntax error in an answer, which really isn't that big of a deal.
The reason why some people are weary of edits to code is because it is littered with pitfalls, and the danger of substantially changing the nature of the post is high.
In this case the changes were so simple, that they pretty much avoided those pitfalls.
This brings me to another issue. Once you take an idea that you perceive to be "community consensus". not modifying code in answers is just one example, and you strictly enforce that on everybody, you've just taken the control away from the community.
And one more comment on this issue. While the editor did make his edit which was partially rolled back by the OP, he did respect the OP's final decision. he did not engage in an edit war like I've seen some other users do. That looks like good behavior to me.