This screenshot was taken on Ubuntu 12.10, but it also happens to my friend on MacBook Air.
It seems like the program thinks that the first single quote is the end of a line, and the second single quote is the beginning of a new line. The odd part: I don't have single quotes until line 26.
If I delete the word chatbox on line 26, the highlight will be fine until line 27 in 'chatinput' . Changing single quotes to double quotes did not help either.

source share