Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
chalk 2.0.1
commander 2.11.0
gruntify-eslint 4.0.0
  • Loading branch information
alexlamsl committed Jul 16, 2017
1 parent 01a7ef7 commit b1a31b2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"dependencies": {
"camel-case": "3.0.x",
"clean-css": "4.1.x",
"commander": "2.9.x",
"commander": "2.11.x",
"he": "1.1.x",
"ncname": "1.0.x",
"param-case": "2.1.x",
Expand All @@ -67,13 +67,13 @@
"grunt": "1.0.x",
"grunt-browserify": "5.0.x",
"grunt-contrib-uglify": "3.0.x",
"gruntify-eslint": "3.1.x",
"gruntify-eslint": "4.0.x",
"phantomjs-prebuilt": "2.1.x",
"qunitjs": "2.x"
},
"benchmarkDependencies": {
"brotli": "1.3.x",
"chalk": "1.1.x",
"chalk": "2.0.x",
"cli-table": "0.3.x",
"lzma": "2.3.x",
"minimize": "2.1.x",
Expand Down
36 changes: 18 additions & 18 deletions src/htmlminifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,29 +131,29 @@ function isAttributeRedundant(tag, attrName, attrValue, attrs) {
attrValue = attrValue ? trimWhitespace(attrValue.toLowerCase()) : '';

return (
tag === 'script' &&
attrName === 'language' &&
attrValue === 'javascript' ||
tag === 'script' &&
attrName === 'language' &&
attrValue === 'javascript' ||

tag === 'form' &&
attrName === 'method' &&
attrValue === 'get' ||
tag === 'form' &&
attrName === 'method' &&
attrValue === 'get' ||

tag === 'input' &&
attrName === 'type' &&
attrValue === 'text' ||
tag === 'input' &&
attrName === 'type' &&
attrValue === 'text' ||

tag === 'script' &&
attrName === 'charset' &&
!attributesInclude(attrs, 'src') ||
tag === 'script' &&
attrName === 'charset' &&
!attributesInclude(attrs, 'src') ||

tag === 'a' &&
attrName === 'name' &&
attributesInclude(attrs, 'id') ||
tag === 'a' &&
attrName === 'name' &&
attributesInclude(attrs, 'id') ||

tag === 'area' &&
attrName === 'shape' &&
attrValue === 'rect'
tag === 'area' &&
attrName === 'shape' &&
attrValue === 'rect'
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/htmlparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
*/

/* global ActiveXObject, DOMDocument */
/* global ActiveXObject, DOMDocument */

'use strict';

Expand Down
10 changes: 5 additions & 5 deletions tests/minifier.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global minify */
/* global minify */
'use strict';

if (typeof minify === 'undefined') {
Expand Down Expand Up @@ -1930,22 +1930,22 @@ QUnit.test('script minification', function(assert) {
assert.equal(minify(input, { minifyJS: true }), input);

input = '<script>(function(){ var foo = 1; var bar = 2; alert(foo + " " + bar); })()</script>';
output = '<script>!function(){alert("1 2")}()</script>';
output = '<script>alert("1 2")</script>';

assert.equal(minify(input, { minifyJS: true }), output);

input = '<script type="text/JavaScript">(function(){ var foo = 1; var bar = 2; alert(foo + " " + bar); })()</script>';
output = '<script type="text/JavaScript">!function(){alert("1 2")}()</script>';
output = '<script type="text/JavaScript">alert("1 2")</script>';

assert.equal(minify(input, { minifyJS: true }), output);

input = '<script type="application/javascript;version=1.8">(function(){ var foo = 1; var bar = 2; alert(foo + " " + bar); })()</script>';
output = '<script type="application/javascript;version=1.8">!function(){alert("1 2")}()</script>';
output = '<script type="application/javascript;version=1.8">alert("1 2")</script>';

assert.equal(minify(input, { minifyJS: true }), output);

input = '<script type=" application/javascript ; charset=utf-8 ">(function(){ var foo = 1; var bar = 2; alert(foo + " " + bar); })()</script>';
output = '<script type="application/javascript;charset=utf-8">!function(){alert("1 2")}()</script>';
output = '<script type="application/javascript;charset=utf-8">alert("1 2")</script>';

assert.equal(minify(input, { minifyJS: true }), output);

Expand Down

0 comments on commit b1a31b2

Please sign in to comment.