Fixed a bug of code block due to the span tags that cross multiple lines.
This patch makes sure all tags are enclosed in every line with the
correct syntax class.