Without fail, every day I come across questions where the person has posted non-runnable code (e.g. CSS only, PHP only, ...), but instead of using the code formatting options of indenting or back ticking, they've found the code snippets button and just dropped their code in a snippet without understanding that that's not what it's intended for.
I'm happy that they've put the code into their question, but sad because they're using snippets when they should just be highlighting their code. And as a side effect, when they insert a snippet they add controls below their code that doesn't do anything:
Can something be added to the system so that when a user embeds a snippet, a reminder pops up reminding them that it's intended for runnable JavaScript, CSS, and HTML code, and explain what we mean by runnable? Maybe a gentle reminder/warning similar to what was recently added to short, "try this" code answers:
Suggestion: When users add snippets to their question, prompts them with something like:
Code Snippets are for runnable JavaScript, CSS, and HTML code blocks. For other code:
- Please use the backticks (The
$
character is just a shortcut forwindow.jQuery
.)- Indent each line by at least by four spaces:
- Wrap your code in <pre> or <code> tags
- Press Ctrl+K
For more information see https://stackoverflow.com/editing-help#code