It seems to me that there is a bug in the smarty bundle. Any time you have a ' in a comment or as an apostrophe in text (as in don't) it thinks it's the start of a string and throws off the hilighting for the rest of the page.
Is this the right place to report this?