monkdiscuss
Roy Johnson
It seems to me that there are an awful lot of posts that get botched for lack of code tags. Naturally, there are none in [id://28877] at the moment, but there are always [438759|some] such posts around.
<p>
I thought that a fairly simple heuristic could be added to the posting feature to look for likely code chunks, and if there are no code tags around them, give a "Woah there!" message that suggests maybe they want to wrap code tags around some of their post.
<p>
I present the heuristics I thought of in Jeff Foxworthy format. If you have better ideas or reasons these aren't a good idea, discuss.
<h4>You might need code tags if...</h4><ul><li>you've got a single digit in square brackets
<li><code>[$</code> appears in your post
<li>you have lines ending in semicolons
<li>you have lines beginning with spaces or tabs
</ul>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-300037">
<hr>
<small><b>Caution:</b> Contents may have been coded under pressure.</small>
</div></div>