Skip to content

Commit 757301b

Browse files
committed
Version 0.9.7
1 parent 906ab0a commit 757301b

12 files changed

+68
-48
lines changed

CHANGELOG

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
March 2, 2012 - v0.9.7
2+
3+
* Fix unqualified attribute issue (fixes #237) (Nicholas C. Zakas)
4+
5+
16
February 10, 2012 - v0.9.6
27

38
* Make sure line numbers are correct for vendor-prefix rule (fixes #238) (Nicholas C. Zakas)
@@ -247,6 +252,8 @@ June 15, 2011 - v0.1.0
247252

248253

249254

255+
256+
250257

251258

252259

build.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project name="csslint" default="build.all">
22

33
<!-- version number -->
4-
<property name="csslint.version" value="0.9.6" />
4+
<property name="csslint.version" value="0.9.7" />
55

66
<!-- the directories containing the source files -->
77
<property name="src.dir" value="./src" />

lib/parserlib.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
24+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
2525
var parserlib = {};
2626
(function(){
2727

@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
931931
THE SOFTWARE.
932932
933933
*/
934-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
934+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
935935
(function(){
936936
var EventTarget = parserlib.util.EventTarget,
937937
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3179,7 +3179,7 @@ Parser.prototype = function(){
31793179

31803180
while(true){
31813181

3182-
if (readMargins && this._margin()){
3182+
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
31833183
//noop
31843184
} else if (this._declaration()){
31853185
if (!tokenStream.match(Tokens.SEMICOLON)){
@@ -4121,6 +4121,7 @@ function PropertyValuePart(text, line, col){
41214121
case "in":
41224122
case "pt":
41234123
case "pc":
4124+
case "ch":
41244125
this.type = "length";
41254126
break;
41264127

release/csslint-node.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 10-February-2012 02:34:15 */
24+
/* Build time: 2-March-2012 02:47:11 */
2525

2626
/*!
2727
Parser-Lib
@@ -46,7 +46,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4646
THE SOFTWARE.
4747
4848
*/
49-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
49+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
5050
var parserlib = {};
5151
(function(){
5252

@@ -956,7 +956,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
956956
THE SOFTWARE.
957957
958958
*/
959-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
959+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
960960
(function(){
961961
var EventTarget = parserlib.util.EventTarget,
962962
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3204,7 +3204,7 @@ Parser.prototype = function(){
32043204

32053205
while(true){
32063206

3207-
if (readMargins && this._margin()){
3207+
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
32083208
//noop
32093209
} else if (this._declaration()){
32103210
if (!tokenStream.match(Tokens.SEMICOLON)){
@@ -4146,6 +4146,7 @@ function PropertyValuePart(text, line, col){
41464146
case "in":
41474147
case "pt":
41484148
case "pc":
4149+
case "ch":
41494150
this.type = "length";
41504151
break;
41514152

@@ -6304,7 +6305,7 @@ var CSSLint = (function(){
63046305
formatters = [],
63056306
api = new parserlib.util.EventTarget();
63066307

6307-
api.version = "0.9.6";
6308+
api.version = "0.9.7";
63086309

63096310
//-------------------------------------------------------------------------
63106311
// Rule Management
@@ -8478,8 +8479,8 @@ CSSLint.addRule({
84788479
if (part.type == parser.SELECTOR_PART_TYPE){
84798480
for (k=0; k < part.modifiers.length; k++){
84808481
modifier = part.modifiers[k];
8481-
if (modifier.type == "attribute" && (!modifier.elementName || modifier.elementName == "*")){
8482-
reporter.report(rule.desc, modifier.line, modifier.col, rule);
8482+
if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
8483+
reporter.report(rule.desc, part.line, part.col, rule);
84838484
}
84848485
}
84858486
}

release/csslint-rhino.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 10-February-2012 02:34:15 */
24+
/* Build time: 2-March-2012 02:47:11 */
2525
var CSSLint = (function(){
2626

2727
/*!
@@ -47,7 +47,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4747
THE SOFTWARE.
4848
4949
*/
50-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
50+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
5151
var parserlib = {};
5252
(function(){
5353

@@ -957,7 +957,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
957957
THE SOFTWARE.
958958
959959
*/
960-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
960+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
961961
(function(){
962962
var EventTarget = parserlib.util.EventTarget,
963963
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3205,7 +3205,7 @@ Parser.prototype = function(){
32053205

32063206
while(true){
32073207

3208-
if (readMargins && this._margin()){
3208+
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
32093209
//noop
32103210
} else if (this._declaration()){
32113211
if (!tokenStream.match(Tokens.SEMICOLON)){
@@ -4147,6 +4147,7 @@ function PropertyValuePart(text, line, col){
41474147
case "in":
41484148
case "pt":
41494149
case "pc":
4150+
case "ch":
41504151
this.type = "length";
41514152
break;
41524153

@@ -6305,7 +6306,7 @@ var CSSLint = (function(){
63056306
formatters = [],
63066307
api = new parserlib.util.EventTarget();
63076308

6308-
api.version = "0.9.6";
6309+
api.version = "0.9.7";
63096310

63106311
//-------------------------------------------------------------------------
63116312
// Rule Management
@@ -8479,8 +8480,8 @@ CSSLint.addRule({
84798480
if (part.type == parser.SELECTOR_PART_TYPE){
84808481
for (k=0; k < part.modifiers.length; k++){
84818482
modifier = part.modifiers[k];
8482-
if (modifier.type == "attribute" && (!modifier.elementName || modifier.elementName == "*")){
8483-
reporter.report(rule.desc, modifier.line, modifier.col, rule);
8483+
if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
8484+
reporter.report(rule.desc, part.line, part.col, rule);
84848485
}
84858486
}
84868487
}

release/csslint-tests.js

+6
Original file line numberDiff line numberDiff line change
@@ -1718,8 +1718,14 @@ background: -ms-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
17181718
"Using an unqualified attribute selector in the middle should not result in a warning": function(){
17191719
var result = CSSLint.verify("[type=text] .foo { font-size: 10px; } ", {"unqualified-attributes": 1 });
17201720
Assert.areEqual(0, result.messages.length);
1721+
},
1722+
1723+
"Using a qualified attribute selector should not result in a warning": function(){
1724+
var result = CSSLint.verify("input[type=text] { font-size: 10px; } ", {"unqualified-attributes": 1 });
1725+
Assert.areEqual(0, result.messages.length);
17211726
}
17221727

1728+
17231729
}));
17241730

17251731
})();

release/csslint-worker.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 10-February-2012 02:34:15 */
24+
/* Build time: 2-March-2012 02:47:11 */
2525

2626
/*!
2727
Parser-Lib
@@ -46,7 +46,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4646
THE SOFTWARE.
4747
4848
*/
49-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
49+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
5050
var parserlib = {};
5151
(function(){
5252

@@ -956,7 +956,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
956956
THE SOFTWARE.
957957
958958
*/
959-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
959+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
960960
(function(){
961961
var EventTarget = parserlib.util.EventTarget,
962962
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3204,7 +3204,7 @@ Parser.prototype = function(){
32043204

32053205
while(true){
32063206

3207-
if (readMargins && this._margin()){
3207+
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
32083208
//noop
32093209
} else if (this._declaration()){
32103210
if (!tokenStream.match(Tokens.SEMICOLON)){
@@ -4146,6 +4146,7 @@ function PropertyValuePart(text, line, col){
41464146
case "in":
41474147
case "pt":
41484148
case "pc":
4149+
case "ch":
41494150
this.type = "length";
41504151
break;
41514152

@@ -6304,7 +6305,7 @@ var CSSLint = (function(){
63046305
formatters = [],
63056306
api = new parserlib.util.EventTarget();
63066307

6307-
api.version = "0.9.6";
6308+
api.version = "0.9.7";
63086309

63096310
//-------------------------------------------------------------------------
63106311
// Rule Management
@@ -8478,8 +8479,8 @@ CSSLint.addRule({
84788479
if (part.type == parser.SELECTOR_PART_TYPE){
84798480
for (k=0; k < part.modifiers.length; k++){
84808481
modifier = part.modifiers[k];
8481-
if (modifier.type == "attribute" && (!modifier.elementName || modifier.elementName == "*")){
8482-
reporter.report(rule.desc, modifier.line, modifier.col, rule);
8482+
if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
8483+
reporter.report(rule.desc, part.line, part.col, rule);
84838484
}
84848485
}
84858486
}

release/csslint-wsh.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 10-February-2012 02:34:15 */
24+
/* Build time: 2-March-2012 02:47:11 */
2525
var CSSLint = (function(){
2626

2727
/*!
@@ -47,7 +47,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4747
THE SOFTWARE.
4848
4949
*/
50-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
50+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
5151
var parserlib = {};
5252
(function(){
5353

@@ -957,7 +957,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
957957
THE SOFTWARE.
958958
959959
*/
960-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
960+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
961961
(function(){
962962
var EventTarget = parserlib.util.EventTarget,
963963
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3205,7 +3205,7 @@ Parser.prototype = function(){
32053205

32063206
while(true){
32073207

3208-
if (readMargins && this._margin()){
3208+
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
32093209
//noop
32103210
} else if (this._declaration()){
32113211
if (!tokenStream.match(Tokens.SEMICOLON)){
@@ -4147,6 +4147,7 @@ function PropertyValuePart(text, line, col){
41474147
case "in":
41484148
case "pt":
41494149
case "pc":
4150+
case "ch":
41504151
this.type = "length";
41514152
break;
41524153

@@ -6305,7 +6306,7 @@ var CSSLint = (function(){
63056306
formatters = [],
63066307
api = new parserlib.util.EventTarget();
63076308

6308-
api.version = "0.9.6";
6309+
api.version = "0.9.7";
63096310

63106311
//-------------------------------------------------------------------------
63116312
// Rule Management
@@ -8479,8 +8480,8 @@ CSSLint.addRule({
84798480
if (part.type == parser.SELECTOR_PART_TYPE){
84808481
for (k=0; k < part.modifiers.length; k++){
84818482
modifier = part.modifiers[k];
8482-
if (modifier.type == "attribute" && (!modifier.elementName || modifier.elementName == "*")){
8483-
reporter.report(rule.desc, modifier.line, modifier.col, rule);
8483+
if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
8484+
reporter.report(rule.desc, part.line, part.col, rule);
84848485
}
84858486
}
84868487
}

release/csslint.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 10-February-2012 02:34:15 */
24+
/* Build time: 2-March-2012 02:47:11 */
2525
var CSSLint = (function(){
2626

2727
/*!
@@ -47,7 +47,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4747
THE SOFTWARE.
4848
4949
*/
50-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
50+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
5151
var parserlib = {};
5252
(function(){
5353

@@ -957,7 +957,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
957957
THE SOFTWARE.
958958
959959
*/
960-
/* Version v0.1.5, Build time: 10-February-2012 12:59:26 */
960+
/* Version v0.1.6, Build time: 2-March-2012 02:44:32 */
961961
(function(){
962962
var EventTarget = parserlib.util.EventTarget,
963963
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3205,7 +3205,7 @@ Parser.prototype = function(){
32053205

32063206
while(true){
32073207

3208-
if (readMargins && this._margin()){
3208+
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
32093209
//noop
32103210
} else if (this._declaration()){
32113211
if (!tokenStream.match(Tokens.SEMICOLON)){
@@ -4147,6 +4147,7 @@ function PropertyValuePart(text, line, col){
41474147
case "in":
41484148
case "pt":
41494149
case "pc":
4150+
case "ch":
41504151
this.type = "length";
41514152
break;
41524153

@@ -6305,7 +6306,7 @@ var CSSLint = (function(){
63056306
formatters = [],
63066307
api = new parserlib.util.EventTarget();
63076308

6308-
api.version = "0.9.6";
6309+
api.version = "0.9.7";
63096310

63106311
//-------------------------------------------------------------------------
63116312
// Rule Management
@@ -8479,8 +8480,8 @@ CSSLint.addRule({
84798480
if (part.type == parser.SELECTOR_PART_TYPE){
84808481
for (k=0; k < part.modifiers.length; k++){
84818482
modifier = part.modifiers[k];
8482-
if (modifier.type == "attribute" && (!modifier.elementName || modifier.elementName == "*")){
8483-
reporter.report(rule.desc, modifier.line, modifier.col, rule);
8483+
if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
8484+
reporter.report(rule.desc, part.line, part.col, rule);
84848485
}
84858486
}
84868487
}

0 commit comments

Comments
 (0)