Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

option.cap

  • Loading branch information...
commit 3b6d102bffdba3b5272d43316ddf5cb6ab32326c 1 parent 872ce19
@douglascrockford authored
Showing with 10 additions and 30 deletions.
  1. +2 −5 jslint.html
  2. +8 −17 jslint.js
  3. +0 −8 lint.html
View
7 jslint.html
@@ -256,11 +256,10 @@
<div title=vars><button></button><var></var> many var statements per function</div>
<div title=white><button></button><var></var> messy white space</div>
<div title=css><button></button><var></var> CSS workarounds</div>
- <div title=cap><button></button><var></var> HTML case</div>
<div title=on><button></button><var></var> HTML event handlers</div>
<div title=fragment><button></button><var></var> HTML fragments</div>
- <div>&nbsp;</div>
- <div>&nbsp;</div>
+ <br>
+ <div title=passfail><button></button><var></var> Stop on first error</div>
</div>
<div class=tristate>Assume...
<div title=browser><button></button><var></var> a browser</div>
@@ -269,8 +268,6 @@
<div title=rhino><button></button><var></var> <a href="http://www.mozilla.org/rhino/">Rhino</a></div>
<div title=windows><button></button><var></var> Windows</div>
<br>
- <div title=passfail><button></button><var></var> Stop on first error</div>
- <br>
<div title=safe><button></button><var></var> Safe Subset</div>
<div title=adsafe><button></button><var></var> Verify&nbsp;<a href="http://www.ADsafe.org">ADsafe</a></div>
</div>
View
25 jslint.js
@@ -1,5 +1,5 @@
// jslint.js
-// 2012-11-16
+// 2012-11-17
// Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
@@ -172,7 +172,6 @@
// anon true, if the space may be omitted in anonymous function declarations
// bitwise true, if bitwise operators should be allowed
// browser true, if the standard browser globals should be predefined
-// cap true, if upper case HTML should be allowed
// 'continue' true, if the continuation statement should be tolerated
// css true, if CSS workarounds should be tolerated
// debug true, if debugger statements should be allowed
@@ -238,7 +237,7 @@
'border-top', 'border-top-color', 'border-top-left-radius',
'border-top-right-radius', 'border-top-style', 'border-top-width',
'border-width', bottom, 'box-shadow', br, braille, browser, button, c, call,
- canvas, cap, caption, 'caption-side', center, charAt, charCodeAt, character,
+ canvas, caption, 'caption-side', center, charAt, charCodeAt, character,
cite, clear, clip, closure, cm, code, col, colgroup, color, combine_var,
command, conditional_assignment, confusing_a, confusing_regexp,
constructor_name_a, content, continue, control_a, 'counter-increment',
@@ -341,7 +340,6 @@ var JSLINT = (function () {
anon : true,
bitwise : true,
browser : true,
- cap : true,
'continue': true,
css : true,
debug : true,
@@ -5429,9 +5427,8 @@ klass: do {
function style_selector() {
if (next_token.identifier) {
- if (!Object.prototype.hasOwnProperty.call(html_tag, option.cap
- ? next_token.string.toLowerCase()
- : next_token.string)) {
+ if (!Object.prototype.hasOwnProperty.call(html_tag,
+ next_token.string)) {
warn('expected_tagname_a');
}
advance();
@@ -5863,9 +5860,6 @@ klass: do {
tag_name = next_token;
name = tag_name.string;
advance_identifier(name);
- if (option.cap) {
- name = name.toLowerCase();
- }
tag_name.name = name;
if (!stack) {
stack = [];
@@ -5903,7 +5897,7 @@ klass: do {
attribute = next_token.string;
option.white = old_white;
advance();
- if (!option.cap && attribute !== attribute.toLowerCase()) {
+ if (attribute !== attribute.toLowerCase()) {
warn('attribute_case_a', token);
}
attribute = attribute.toLowerCase();
@@ -5984,9 +5978,6 @@ klass: do {
warn('bad_name_a');
}
name = next_token.string;
- if (option.cap) {
- name = name.toLowerCase();
- }
advance();
if (!stack) {
stop('unexpected_a', next_token, closetag(name));
@@ -6428,10 +6419,10 @@ klass: do {
key,
keys = Object.keys(property).sort(),
length,
- output = ['/*properties'],
mem = ' ',
name,
- not_first = false;
+ not_first = false,
+ output = ['/*properties'];
for (i = 0; i < keys.length; i += 1) {
key = keys[i];
if (property[key] > 0) {
@@ -6456,7 +6447,7 @@ klass: do {
itself.jslint = itself;
- itself.edition = '2012-11-16';
+ itself.edition = '2012-11-17';
return itself;
}());
View
8 lint.html
@@ -485,9 +485,6 @@ <h1 id=html>HTML</h1>
string literals. You should always write<code> '&lt;\/' </code>instead.
The extra backslash is ignored by the JavaScript compiler but not by the
HTML parser. Tricks like this should not be necessary, and yet they are.</p>
-<p>There is a <code>cap</code> <a href="#options">option</a> that allows
- use of uppercase tag names. There is also an <code>on</code> <a href="#options">option</a>
- that allows the use of inline HTML event handlers.</p>
<p>There is a <code>fragment</code> <a href="#options">option</a> that can
inspect a well formed HTML fragment. If the <code>adsafe</code> <a href="#options">option</a>
is also used, then the fragment must be a <code>&lt;div&gt;</code> that
@@ -545,11 +542,6 @@ <h1 id=options>Options</h1>
<a href="#browser"><small>(more)</small></a> </td>
</tr>
<tr>
- <td>Tolerate HTML case </td>
- <td><code>cap</code></td>
- <td><code>true</code> if uppercase HTML should be allowed.</td>
- </tr>
- <tr>
<td>Tolerate <code>continue</code></td>
<td><code>continue</code></td>
<td><code>true</code> if the <code>continue</code> statement should be allowed.</td>
Please sign in to comment.
Something went wrong with that request. Please try again.