Edits adding a snippet
If the snippet demonstrates the issue the OP is asking about when you click Run code snippet, approve. If not, reject.
Edits removing a snippet
If the snippet demonstrates the issue the OP is asking about when you click Run code snippet, reject. If not, it's more complicated:
If the snippet contains invalid content, approve. Examples:
- Something that isn't HTML in the HTML panel, including PHP tags.
- Something that isn't JavaScript in the JavaScript panel, including TypeScript or CoffeeScript or similar unless a client-side transpiler has also been correctly included.
Note 1: JavaScript has been changing a lot lately, some modern JavaScript doesn't look much like JavaScript from five years ago.
Note 2: React snippets may well contain what looks like invalid JavaScript in the form of JSX, but provided the Babel checkbox is checked, that's fine (details here).
- Something that isn't CSS in the CSS panel, including Less or Sass.
If the snippet could be reasonably edited to demonstrate the issue the OP is asking about (for instance, it's missing a library that could readily be added) but just hasn't been, I would lean toward reject on the basis that it doesn't improve anything to go backward. But this would be vary case-by-case. The right thing where possible, of course, would be to add the missing things.
Edits editing a snippet
(Just for completeness.)
Pretty much like any other edit: If it's an improvement, approve; if not, reject.
For example:
- If the original snippet didn't demonstrates the problem and the new one does, approve.
- If the original snippet demonstrated the problem and the new one doesn't, reject.
- If the snippet should have just been removed (see above — wrong languages, etc.), reject.
- If the original snippet didn't didn't demonstrate the problem, and the new one doesn't either, but the edit improves it in some way (formatting, adding missing library, etc.), approve; if not, reject.
<img>
s with relative URLs that obviously 404 when on Stack Overflow, putting SCSS into the CSS section, and so on - and trust me, question askers manage to do them much more often than they manage to get it right. Meanwhile, there are swathes of suggested editors who will blindly turn (perfectly fine) non-snippet code blocks into blatantly broken snippets, and reviewers ready and willing to approve those edits.