Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

But

$('<tag></tag>')

doesn't.

The problem seems to come with the '/>' thing.

This is happening in gedit, aptana and scribes.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

My flavor of Vim happens to handle self-closing tags. In general, editor syntax highlighters use lexical rules, not semantic ones to figure out how to colorize. Since (X|HT)ML is not a regular language, it is pretty easy to fool them.

Indeed for just about any language, it is possible to generate a construction that will fool the highlighter. You may be able to find improved highlighters for <your preferred editor/> or you may just have to choose between "fast and mistaken" or "slow and precise"

share|improve this answer
add comment

Try

$("<tag />")

and see if that breaks highlighting too.

share|improve this answer
    
Yes, it does. And in all editors again. –  Erik Escobedo Jul 7 '10 at 17:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.