html-minifier 3.5.6 → 3.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/package.json +4 -4
- package/src/htmlminifier.js +1 -1
- package/src/htmlparser.js +1 -1
package/README.md
CHANGED
|
@@ -22,19 +22,19 @@ How does HTMLMinifier compare to other solutions — [HTML Minifier from Will Pe
|
|
|
22
22
|
|
|
23
23
|
| Site | Original size *(KB)* | HTMLMinifier | minimize | Will Peavy | htmlcompressor.com |
|
|
24
24
|
| ---------------------------------------------------------------------------- |:--------------------:| ------------:| --------:| ----------:| ------------------:|
|
|
25
|
-
| [Google](https://www.google.com/) |
|
|
26
|
-
| [HTMLMinifier](https://github.com/kangax/html-minifier) |
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
25
|
+
| [Google](https://www.google.com/) | 46 | **43** | 46 | 48 | 46 |
|
|
26
|
+
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 134 | **104** | 112 | 117 | 112 |
|
|
27
|
+
| [New York Times](https://www.nytimes.com/) | 209 | **140** | 159 | 158 | 147 |
|
|
28
|
+
| [Stack Overflow](https://stackoverflow.com/) | 252 | **197** | 207 | 215 | 204 |
|
|
29
|
+
| [BBC](https://www.bbc.co.uk/) | 260 | **213** | 252 | 259 | 245 |
|
|
30
30
|
| [Bootstrap CSS](https://getbootstrap.com/docs/3.3/css/) | 272 | **260** | 269 | 229 | 269 |
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [NBC](https://www.nbc.com/) |
|
|
31
|
+
| [Twitter](https://twitter.com/) | 333 | **248** | 297 | 326 | 297 |
|
|
32
|
+
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 466 | **435** | 451 | 465 | 450 |
|
|
33
|
+
| [Amazon](https://www.amazon.co.uk/) | 476 | **409** | 462 | 466 | n/a |
|
|
34
|
+
| [NBC](https://www.nbc.com/) | 625 | **595** | 622 | 625 | n/a |
|
|
35
35
|
| [Eloquent Javascript](https://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a |
|
|
36
|
-
| [ES6 table](https://kangax.github.io/compat-table/es6/) |
|
|
37
|
-
| [ES6 draft](https://tc39.github.io/ecma262/) |
|
|
36
|
+
| [ES6 table](https://kangax.github.io/compat-table/es6/) | 4174 | **3538** | 3944 | n/a | n/a |
|
|
37
|
+
| [ES6 draft](https://tc39.github.io/ecma262/) | 5717 | **5101** | 5250 | n/a | n/a |
|
|
38
38
|
|
|
39
39
|
## Options Quick Reference
|
|
40
40
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-minifier",
|
|
3
3
|
"description": "Highly configurable, well-tested, JavaScript-based HTML minifier.",
|
|
4
|
-
"version": "3.5.
|
|
4
|
+
"version": "3.5.7",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
7
7
|
"compress",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"camel-case": "3.0.x",
|
|
58
58
|
"clean-css": "4.1.x",
|
|
59
|
-
"commander": "2.
|
|
59
|
+
"commander": "2.12.x",
|
|
60
60
|
"he": "1.1.x",
|
|
61
61
|
"ncname": "1.0.x",
|
|
62
62
|
"param-case": "2.1.x",
|
|
63
63
|
"relateurl": "0.2.x",
|
|
64
|
-
"uglify-js": "3.
|
|
64
|
+
"uglify-js": "3.2.x"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"grunt": "1.0.x",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"benchmarkDependencies": {
|
|
75
75
|
"brotli": "1.3.x",
|
|
76
|
-
"chalk": "2.
|
|
76
|
+
"chalk": "2.3.x",
|
|
77
77
|
"cli-table": "0.3.x",
|
|
78
78
|
"lzma": "2.3.x",
|
|
79
79
|
"minimize": "2.1.x",
|
package/src/htmlminifier.js
CHANGED
|
@@ -283,7 +283,7 @@ function cleanAttributeValue(tag, attrName, attrValue, options, attrs) {
|
|
|
283
283
|
attrValue = trimWhitespace(attrValue);
|
|
284
284
|
if (attrValue) {
|
|
285
285
|
if (/;$/.test(attrValue) && !/&#?[0-9a-zA-Z]+;$/.test(attrValue)) {
|
|
286
|
-
attrValue = attrValue.replace(/\s*;$/, '');
|
|
286
|
+
attrValue = attrValue.replace(/\s*;$/, ';');
|
|
287
287
|
}
|
|
288
288
|
attrValue = unwrapInlineCSS(options.minifyCSS(wrapInlineCSS(attrValue)));
|
|
289
289
|
}
|
package/src/htmlparser.js
CHANGED
|
@@ -70,7 +70,7 @@ var inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,co
|
|
|
70
70
|
|
|
71
71
|
// Elements that you can, intentionally, leave open
|
|
72
72
|
// (and which close themselves)
|
|
73
|
-
var closeSelf = makeMap('colgroup,dd,dt,li,
|
|
73
|
+
var closeSelf = makeMap('colgroup,dd,dt,li,option,p,td,tfoot,th,thead,tr,source');
|
|
74
74
|
|
|
75
75
|
// Attributes that have their values filled in disabled='disabled'
|
|
76
76
|
var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected');
|