I don't have a lot of experience with SO, so I'm trying to understand what's acceptable here. I made an edit to an answer that I thought was constructive and for the benefit of the readers, but it was almost immediately rejected by 4 reviewers.
The answer in question is here. It's technically incorrect, but is accepted (I did not intend to challenge this with my edit, nor do I think that I did). Additionally, it presents a sample JavaScript snippet that would cause an infinite loop when executed. To make matters worse, the answer links to a JSFiddle executing this snippet and if a reader follows the link, the browser ends up hanging and could force the user to kill it (potentially losing some unsaved work).
Here is the edit that I made to the code:
As you can see, while the question was asking for a regexp to solve a particular problem, I did not even touch the proposed regexp and only fixed the offending (infinite) while loop involved in console logging. I also removed the jsfiddle link that would cause the browser hang. The meaning of the answer, in my opinion, remained completely unchanged.
The first thing that I find confusing, is that the reasons given for rejection were "The edit is incorrect or an attempt to reply to or comment on the existing post". I don't see how my edits do any of that. Additionally, the reply I got from the author of the answer was that "[my] edit was rejected because [I] completely changed [his] answer". I personally don't believe that I did, but I do not want to challenge (too much) an SO user who has way more experience with SO than I do.
So at this point, I am quite confused as to what constitutes an appropriate edit to an answer. Especially, since when you go to edit an answer, the message at the top states "We welcome all constructive edits, but please make them substantial. Avoid trivial, tiny one-letter edits unless absolutely necessary". What is substantial, but not over-substantial?