Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/CSSLint.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var CSSLint = (function(){

var rules = [],
formatters = [],
embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
embeddedRuleset = /\/\*\s?csslint([^\*]*)\*\//,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not allow more than one space in the embedded ruleset? (i.e. use "*" instead of "?")

Also, it would be cool if you could add a test to tests/core/CSSLint.js to make sure the behaviour works the way you expect. 😉 Something like:

"Spaces should be allowed in embedded rulesets": function(){
    var result = CSSLint.verify("/* csslint bogus, adjoining-classes:true, box-sizing:false */\n.foo.bar{}", {
      "text-indent": 1,
      "box-sizing": 1
    });

    Assert.areEqual(2, result.ruleset["adjoining-classes"]);
    Assert.areEqual(1, result.ruleset["text-indent"]);
    Assert.areEqual(0, result.ruleset["box-sizing"]);
}

would work.

api = new parserlib.util.EventTarget();

api.version = "@VERSION@";
Expand Down