The prospect of auto-detecting when the user failed to insert CODE tags was discussed
at Automatic CODE tags
. In particular, Corion
came up with some basic test code
Lately, there have been several posts that did not use the CODE tags. While I'm all for educating
users, there will always be un-tagged posts as long as we have new users. I (re)suggest the following:
- Users have an "auto-correct CODE tags" option, which defaults to on. This sets whether PM checks when you post.
- If your post contains no CODE tags,
- AND you have the auto-correct option set,
- AND your post contains more than 5 (?) semicolons (not a heavily used punctuation in non-code), then your entire post will be wrapped in CODE tags
- If the post is thus wrapped, "CODE automatically wrapped, please use <CODE> </CODE> tags in the future (See Site How To for info)" is added to the top of the post.
This looks fairly simple to add to the code base, doesn't effect advanced users, and tries to teach newbies, while making PM easier to navigate.
(We could alternatively use Corions code, but it looks to based too much on syntax, which will be highly variable with newbies.)