I cannot recall how many times I have edited questions like this (look at the bottom part in red)..
Down there at the bottom is a
} that should obviously have been included in the code block.
I wish code posters would check the preview of their question, notice the problem and fix it, or maybe look at the edits made to their question and take on board the changes. But if wishes were horses, no man would walk.
What I would like to see is a check for a line after the high-lit code that:
- Is the next line that has characters
- Is a closing bracket (in whatever the language of the major tag specifies as the code block close bracket)
- Is the only character on the line (ignoring white-space).
And then on detecting such a condition, either:
- Prompt the user 'Did you forget to highlight the last line?', or better still..
- Automatically include that line.
Can we get something like this implemented?
As rene adroitly pointed out in a query for dangling close brackets - there are over 5000 instances of this since the beginning of the year. And that number is counting only the ones that have not already been fixed by editing!