google / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
110 stars 37 forks source link

E4X: less-than and greater-than symbols should not be handled as "operators" #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
$> cat with_e4x.js 
var f = <feed xmlns="http://www.w3.org/2005/Atom"/>;
$> fixjsstyle with_e4x.js 
Fixed 5 errors in /Users/filip/workspace/codefairy2/with_e4x.js
$> cat with_e4x.js 
var f = < feed xmlns = 'http://www.w3.org/2005/Atom'/ >;

What is the expected output?
var f = <feed xmlns="http://www.w3.org/2005/Atom"/>;

(file untouched)

What do you see instead?
var f = < feed xmlns = 'http://www.w3.org/2005/Atom'/ >;

(fixjsstyle thinks this these are operators and puts spaces around them)

What version of the product are you using? On what operating system?

2.2.4 / mac

Please provide any additional information below.

http://en.wikipedia.org/wiki/ECMAScript_for_XML

Original issue reported on code.google.com by filip.noetzel on 12 Sep 2010 at 9:16

GoogleCodeExporter commented 9 years ago
The less-than and greater-than symbols are operators in (most) JavaScript. It 
seems that this E4X extension changes this by adding in native support for XML. 
Changing this issue to a feature request, since it's basically asking for E4X 
support. 

Original comment by a...@google.com on 13 Sep 2010 at 12:13