I think I have a case of JSLint being confused, though I'm not a javascript language lawyer.
In a regexp, I have octal constants, but get what I believe is an incorrect warning. If I switch to the equivalent hex constants (\x02 etc), JSLint is happy. Here is the code in question.
O:\scripts.js(890): warning: non-octal digit in an escape sequence that doesn't match a back-reference
var kpair = items[i].split( /(\002|\003)/ );
............................................^
O:\scripts.js(890): warning: non-octal digit in an escape sequence that doesn't match a back-reference
var kpair = items[i].split( /(\002|\003)/ );
............................................^
O:\scripts.js(900): warning: non-octal digit in an escape sequence that doesn't match a back-reference
var newval = kpair[2].split( /\004/ );
.................................................^
I'd rather not change the constants as they are octal in the corresponding server-side code.
If I'm confused, how should I be specifying these octal constants? If it's JSLint, does this suffice as a bug report?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I have a case of JSLint being confused, though I'm not a javascript language lawyer.
In a regexp, I have octal constants, but get what I believe is an incorrect warning. If I switch to the equivalent hex constants (\x02 etc), JSLint is happy. Here is the code in question.
I'd rather not change the constants as they are octal in the corresponding server-side code.
If I'm confused, how should I be specifying these octal constants? If it's JSLint, does this suffice as a bug report?
Thanks!