# When are syntax errors protected from edits? [duplicate]

Possible Duplicate:
How far can I refactor someone else’s code?

I stumbled across an interesting post, Are self-closing tags valid in HTML5?. There's an error in the initial question; self-closing tags are displayed as \> instead of the correct />. There's been a long edit war of people attempting to correct this, and it seems to have been decided in favor of the OP.

This sounds counter-intuitive to me. The syntactical error is irrelevant to the question being asked, so it makes the question much clearer if future readers don't even have to think about it.

For what reason is it valid to maintain irrelevant syntax errors during edits?

-

## marked as duplicate by Shog9♦Feb 1 '13 at 22:49

In the case of that question, it could be that it's because the OP was confused about the syntax that validators don't accept those tags as valid. It is not a given that the slashes should be corrected, that is perhaps the point of the post. –  Martijn Pieters Feb 1 '13 at 16:44
Makes sense, but it's interesting that there's only one answer that is directly concerned with that error. The rest focus on the differences introduced by HTML5. I suppose that's a tangential question about answers hijacking the original question. –  Brad Koch Feb 1 '13 at 16:53
Well, you did the right thing for this case; you asked the OP in a comment. –  Martijn Pieters Feb 1 '13 at 16:55

Though this has been discussed a number of times, allow me to take one more run at it.

As the OP of the question in question, I feel that it's important to leave code samples in a question intact because in many cases, the code in question is what's causing the problem.

In this case in particular, I had the syntax wrong and that is what prompted the question in the first place. If the syntax had been correct, the W3C validator would have been happy and I would have not even thought that self-closing tags wouldn't be valid.

In a more general sense, people primarily ask questions when something happens that they didn't expect and they don't know why. If that something involves code that doesn't behave as expected in some way, it's crucial to leave that code as-is because changing it (particularly to be "correct") negates the entire point of the question.

In this particular instance, the self-closing syntax being incorrect everywhere in the question is illustrative of the OP (me) not realizing that it's incorrect and makes it more clear (or at least likely) that the issue isn't just a single typo, but is a deeper or more systemic issue.

In this case, "correcting" any of the syntax errors is 100% inappropriate because the entire question is about the (unknown) syntax errors. Altering this only makes things less clear.

-
This: "it's important to leave code samples in a question intact because in many cases, the code in question is what's causing the problem." –  ChrisF Feb 1 '13 at 22:43
@ChrisF I'm still not following. Could someone put the relevant bits in bold for me? –  ЯegDwight Feb 1 '13 at 22:45
@ЯegDwight - I tried but couldn't make it any bolder. –  ChrisF Feb 1 '13 at 22:47
As one of the people who got engaged in this "edit war" after trying to reject this suggestion I couldn't agree more... the answers make little sense if the question is changed, which makes the whole thing rather pointless. I would prefer some sort of permanent lock on this question as people keep thinking that "improving" the question makes everything okay. –  ben is uǝq backwards Feb 1 '13 at 22:47
Thanks @cdeszaq, it's clear that there are two differing questions creating confusion. Everyone finding it nowadays is asking "Should I use self closing tags?" when the original question was "Why is the validator failing the closing tags?" –  Brad Koch Feb 1 '13 at 23:38