We highly encourage edits and the more you improve the better, as long as you keep the original meaning of the post. As 10 Rep said small edits are discouraged, you should fix everything that you can think of in the post.
If you think the OP might not understand your changes and you fear they might roll back then you should clearly and politely explain in the edit summary why you made these changes. If OP still rolls it back then it's their loss.
What can you change in an edit?
You can change pretty much anything as long as you do not change the original intent of the poster.
If this is the question then make sure that you didn't change the wording to ask for something else instead. Make sure that the code example is still an MCVE and the error message is posted as it was appearing on OP's screen. Many times this requires you to change a lot. On some occasions, I had to change the tag and remove 80-90% of the code from the question to salvage it. You should also pay attention to the title and tags, as they are helpful in finding the question. Tags should never be present in the title, and the title should clearly describe the topic.
If this is an answer, then it's best to leave the code as-is. However, if you see typos, unformatted code or some serious mistakes you can retouch the code. Make sure that the answer is understandable and that you do not put words in the mouth of the poster unless this is a Community Wiki post.
For both, try to fix grammar, spelling, markdown formatting, and remove all fluff ("hi", "Hope it helps", "thanks", "TIA", "can someone help me?").
What should you not do in an edit?
- Do not abuse formatting!
- Do not add more to the post than is necessary!
- Do not add your own improved solutions to the answer!
- Do not add meta-comments (comments about the post itself)!
- Do not change the code style!
The goal is to improve the post as much as possible without turning it into a new one.
tree
command to format a directory content.