I have been working on a custom style for Stellent IDOC and have run into a similar error.
I have (enough) of the keywords highlighted (still some issues with comments)
However I am also getting these strange zig-zag underlining on all javascript (IDOC combines html and custom <$ $> or <@ @> tags)
Is there a way to control this, Ive noticed it happening in other styles (a known 4.0 issue?)