In this case there is very little else that could have been fixed in that answer, except for trimming out the HTH at the end; and I personally believe that any improvement to a question or answer, no matter how "small" (e.g. correcting syntax highlighting), is valuable.
The problem comes in when, as in this case, it's a user with under 2k reputation making such edits - because of course edits by users below that threshold have to be reviewed, and it's a waste of time for others to review such small edits.
In short, it depends (as a famous AoE2 caster is known to say). While small edits can be valuable, they need to be balanced against the overhead of making such edits. If you have 2k rep there is no overhead, so edit away; if not, you should be a little more careful and thorough.
That does, however, seem to create a case of "rules for thee, not for me" - but this is negated by the rep requirement. By getting to 2k rep, you have proved yourself a trusted user on this site, which implicitly means we no longer see the need to review your every action.
This dichotomy is not aided by the help centre on editing which, like most of the "help" centre, is woefully vague to the point of uselessness. Do you see any rule against editing posts to fix syntax highlighting? Nope. How about removing HTH-style fluff? Zero. Definition of "substantial"? Nuh-uh. However, there is an explicit call-out that editing for spelling and grammar is good, which I would consider relatively minor; and as this is a programming site, I'd lump editing for syntax highlighting in with spelling and grammar.
Therefore, on balance, I think it's probably "more correct" to reject this edit and use it as a tool to teach the user about the unwritten rules decided on by Meta re editing, than it is to allow the edit through. But it's important to understand that by this site's written rules, that user didn't do anything wrong - yet they're effectively being punished.
This disconnect between written and de facto rules is arguably the reason why Stack Overflow is considered "unwelcoming", and it's so easy to fix that I honestly don't understand why SE Inc. hasn't done it... except that getting SE Inc. to spend 5 minutes to fix something simple that needs to be fixed, as opposed to them inventing arbitrary months-long projects that nobody asked for, is somewhat of a lost cause at this point. You can lead a horse to water, but that doesn't help if it's decided it doesn't want to drink...