Fix config file comment removal #112

Merged
merged 1 commit into from May 17, 2012

2 participants

@aag

This commit fixes the regex that removes /* */ style comments from the config file. Previously, the regex was greedy, so it would remove everything between the first /* and the last */ in the file. So, if the file looked like this:

{
    /* comment */
    "node" : true,

    /* comment */
    "browser" : true
}

then the "node" attribute would be removed from the file.

Now, it only removes things between each /* and the next */ in the file, so the above file would be cleaned up as expected.

@brentlintner brentlintner merged commit 82f5d45 into jshint:master May 17, 2012
@brentlintner

Looks good to me. Much appreciated for the report + fix! I (just) published this in 0.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment