While posting anything on SO, I never type
<code> tags. However, when my post appears on the site, the code are properly formatted. I checked the source and found that the code part of the post is put within the
<code> tag. This works even for a small code like rec(0).
I want to know what is the algorithm to identify that a particular text is code and not regular text.