I have found that if you use code that looks like this:
[ code]some code[ /code]
some code[ /code]
The numbers will turn out wrong. However, doing this type of code:
Makes the number aligned, but also adds a new line to the end of the codeblock.
Just thought that information would be useful