Skip to content

Commit 3e116df

Browse files
committed
Version 3.4.4
1 parent b7b32cf commit 3e116df

File tree

6 files changed

+37
-33
lines changed

6 files changed

+37
-33
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ How does HTMLMinifier compare to other solutions — [HTML Minifier from Will Pe
2323
| Site | Original size *(KB)* | HTMLMinifier | minimize | Will Peavy | htmlcompressor.com |
2424
| --------------------------------------------------------------------------- |:--------------------:| ------------:| --------:| ----------:| ------------------:|
2525
| [Google](https://www.google.com/) | 44 | **42** | 45 | 46 | 45 |
26-
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 124 | **97** | 105 | 109 | 104 |
27-
| [CNN](http://www.cnn.com/) | 131 | **121** | 129 | 130 | 124 |
28-
| [Amazon](http://www.amazon.co.uk/) | 189 | **158** | 181 | 184 | n/a |
29-
| [New York Times](http://www.nytimes.com/) | 200 | **131** | 149 | 148 | 139 |
30-
| [Stack Overflow](http://stackoverflow.com/) | 223 | **172** | 181 | 189 | 178 |
31-
| [BBC](http://www.bbc.co.uk/) | 224 | **185** | 217 | 223 | 211 |
26+
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 125 | **98** | 106 | 110 | 106 |
27+
| [CNN](http://www.cnn.com/) | 135 | **124** | 132 | 133 | 128 |
28+
| [Amazon](http://www.amazon.co.uk/) | 193 | **161** | 184 | 187 | n/a |
29+
| [New York Times](http://www.nytimes.com/) | 204 | **135** | 152 | 152 | 143 |
30+
| [Stack Overflow](http://stackoverflow.com/) | 224 | **173** | 182 | 190 | 179 |
31+
| [BBC](http://www.bbc.co.uk/) | 225 | **186** | 219 | 225 | 213 |
3232
| [Bootstrap CSS](http://getbootstrap.com/css/) | 272 | **260** | 269 | 229 | 269 |
33-
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 547 | **500** | 527 | 545 | 526 |
34-
| [NBC](http://www.nbc.com/) | 572 | **549** | 570 | 572 | 555 |
33+
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 549 | **502** | 530 | 548 | 529 |
34+
| [NBC](http://www.nbc.com/) | 634 | **603** | 632 | 634 | n/a |
3535
| [Eloquent Javascript](http://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a |
36-
| [ES6 table](http://kangax.github.io/compat-table/es6/) | 4453 | **3763** | 4205 | n/a | n/a |
37-
| [ES6 draft](https://tc39.github.io/ecma262/) | 5505 | **4913** | 5060 | n/a | n/a |
36+
| [ES6 table](http://kangax.github.io/compat-table/es6/) | 4380 | **3695** | 4130 | n/a | n/a |
37+
| [ES6 draft](https://tc39.github.io/ecma262/) | 5506 | **4913** | 5060 | n/a | n/a |
3838

3939
## Options Quick Reference
4040

dist/htmlminifier.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* HTMLMinifier v3.4.3 (http://kangax.github.io/html-minifier/)
2+
* HTMLMinifier v3.4.4 (http://kangax.github.io/html-minifier/)
33
* Copyright 2010-2017 Juriy "kangax" Zaytsev
44
* Licensed under the MIT license
55
*/
@@ -3477,9 +3477,9 @@ function removeWhitespace(value, format) {
34773477
wasWhitespace = isWhitespace;
34783478
}
34793479

3480-
return stripped
3481-
.join('')
3482-
.replace(withCaseAttribute ? CASE_RESTORE_PATTERN : null, '$1 $2]');
3480+
return withCaseAttribute ?
3481+
stripped.join('').replace(CASE_RESTORE_PATTERN, '$1 $2]') :
3482+
stripped.join('');
34833483
}
34843484

34853485
function removeQuotes(value) {
@@ -13031,6 +13031,10 @@ process.off = noop;
1303113031
process.removeListener = noop;
1303213032
process.removeAllListeners = noop;
1303313033
process.emit = noop;
13034+
process.prependListener = noop;
13035+
process.prependOnceListener = noop;
13036+
13037+
process.listeners = function (name) { return [] }
1303413038

1303513039
process.binding = function (name) {
1303613040
throw new Error('process.binding is not supported');
@@ -34155,7 +34159,7 @@ function createSortFns(value, options, uidIgnore, uidAttr) {
3415534159
for (var i = 0, len = attrs.length; i < len; i++) {
3415634160
var attr = attrs[i];
3415734161
if (classChain && (options.caseSensitive ? attr.name : attr.name.toLowerCase()) === 'class') {
34158-
classChain.add(trimWhitespace(attr.value).split(/\s+/).filter(shouldSkipUIDs));
34162+
classChain.add(trimWhitespace(attr.value).split(/[ \t\n\f\r]+/).filter(shouldSkipUIDs));
3415934163
}
3416034164
else if (options.processScripts && attr.name.toLowerCase() === 'type') {
3416134165
currentTag = tag;
@@ -34203,7 +34207,7 @@ function createSortFns(value, options, uidIgnore, uidAttr) {
3420334207
if (classChain) {
3420434208
var sorter = classChain.createSorter();
3420534209
options.sortClassName = function(value) {
34206-
return sorter.sort(value.split(/\s+/)).join(' ');
34210+
return sorter.sort(value.split(/[ \n\f\r]+/)).join(' ');
3420734211
};
3420834212
}
3420934213
}

dist/htmlminifier.min.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<body>
1010
<div id="outer-wrapper">
1111
<div id="wrapper">
12-
<h1>HTML Minifier <span>(v3.4.3)</span></h1>
12+
<h1>HTML Minifier <span>(v3.4.4)</span></h1>
1313
<textarea rows="8" cols="40" id="input"></textarea>
1414
<div class="minify-button">
1515
<button type="button" id="minify-btn">Minify</button>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "html-minifier",
33
"description": "Highly configurable, well-tested, JavaScript-based HTML minifier.",
4-
"version": "3.4.3",
4+
"version": "3.4.4",
55
"keywords": [
66
"cli",
77
"compress",

tests/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<head>
44
<meta charset="utf-8">
55
<title>HTML Minifier Tests</title>
6-
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.3.0.css">
6+
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.3.2.css">
77
</head>
88
<body>
99
<div id="qunit"></div>
1010
<div id="qunit-fixture"></div>
11-
<script src="https://code.jquery.com/qunit/qunit-2.3.0.js"></script>
11+
<script src="https://code.jquery.com/qunit/qunit-2.3.2.js"></script>
1212
<script src="../dist/htmlminifier.js"></script>
1313
<script src="minifier.js"></script>
1414
</body>

0 commit comments

Comments
 (0)