Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .