Occasionally when I post a question on StackExchange and I copy and paste a code sample, when I publish the post, the code sample does not appear to color parts of the code like syntax highlighting. I have even had other members edit my post to add the coloring, but I don't know how to do this.
Is there a reason why pasted code would not be colored? I am using the 4 spaces preceding the code block and the code sample does appear with a grey background.