Skip to content

Commit

Permalink
Version 3.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed May 6, 2017
1 parent b7b32cf commit 3e116df
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 33 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ How does HTMLMinifier compare to other solutions — [HTML Minifier from Will Pe
| Site | Original size *(KB)* | HTMLMinifier | minimize | Will Peavy | htmlcompressor.com |
| --------------------------------------------------------------------------- |:--------------------:| ------------:| --------:| ----------:| ------------------:|
| [Google](https://www.google.com/) | 44 | **42** | 45 | 46 | 45 |
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 124 | **97** | 105 | 109 | 104 |
| [CNN](http://www.cnn.com/) | 131 | **121** | 129 | 130 | 124 |
| [Amazon](http://www.amazon.co.uk/) | 189 | **158** | 181 | 184 | n/a |
| [New York Times](http://www.nytimes.com/) | 200 | **131** | 149 | 148 | 139 |
| [Stack Overflow](http://stackoverflow.com/) | 223 | **172** | 181 | 189 | 178 |
| [BBC](http://www.bbc.co.uk/) | 224 | **185** | 217 | 223 | 211 |
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 125 | **98** | 106 | 110 | 106 |
| [CNN](http://www.cnn.com/) | 135 | **124** | 132 | 133 | 128 |
| [Amazon](http://www.amazon.co.uk/) | 193 | **161** | 184 | 187 | n/a |
| [New York Times](http://www.nytimes.com/) | 204 | **135** | 152 | 152 | 143 |
| [Stack Overflow](http://stackoverflow.com/) | 224 | **173** | 182 | 190 | 179 |
| [BBC](http://www.bbc.co.uk/) | 225 | **186** | 219 | 225 | 213 |
| [Bootstrap CSS](http://getbootstrap.com/css/) | 272 | **260** | 269 | 229 | 269 |
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 547 | **500** | 527 | 545 | 526 |
| [NBC](http://www.nbc.com/) | 572 | **549** | 570 | 572 | 555 |
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 549 | **502** | 530 | 548 | 529 |
| [NBC](http://www.nbc.com/) | 634 | **603** | 632 | 634 | n/a |
| [Eloquent Javascript](http://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a |
| [ES6 table](http://kangax.github.io/compat-table/es6/) | 4453 | **3763** | 4205 | n/a | n/a |
| [ES6 draft](https://tc39.github.io/ecma262/) | 5505 | **4913** | 5060 | n/a | n/a |
| [ES6 table](http://kangax.github.io/compat-table/es6/) | 4380 | **3695** | 4130 | n/a | n/a |
| [ES6 draft](https://tc39.github.io/ecma262/) | 5506 | **4913** | 5060 | n/a | n/a |

## Options Quick Reference

Expand Down
16 changes: 10 additions & 6 deletions dist/htmlminifier.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* HTMLMinifier v3.4.3 (http://kangax.github.io/html-minifier/)
* HTMLMinifier v3.4.4 (http://kangax.github.io/html-minifier/)
* Copyright 2010-2017 Juriy "kangax" Zaytsev
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -3477,9 +3477,9 @@ function removeWhitespace(value, format) {
wasWhitespace = isWhitespace;
}

return stripped
.join('')
.replace(withCaseAttribute ? CASE_RESTORE_PATTERN : null, '$1 $2]');
return withCaseAttribute ?
stripped.join('').replace(CASE_RESTORE_PATTERN, '$1 $2]') :
stripped.join('');
}

function removeQuotes(value) {
Expand Down Expand Up @@ -13031,6 +13031,10 @@ process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
throw new Error('process.binding is not supported');
Expand Down Expand Up @@ -34155,7 +34159,7 @@ function createSortFns(value, options, uidIgnore, uidAttr) {
for (var i = 0, len = attrs.length; i < len; i++) {
var attr = attrs[i];
if (classChain && (options.caseSensitive ? attr.name : attr.name.toLowerCase()) === 'class') {
classChain.add(trimWhitespace(attr.value).split(/\s+/).filter(shouldSkipUIDs));
classChain.add(trimWhitespace(attr.value).split(/[ \t\n\f\r]+/).filter(shouldSkipUIDs));
}
else if (options.processScripts && attr.name.toLowerCase() === 'type') {
currentTag = tag;
Expand Down Expand Up @@ -34203,7 +34207,7 @@ function createSortFns(value, options, uidIgnore, uidAttr) {
if (classChain) {
var sorter = classChain.createSorter();
options.sortClassName = function(value) {
return sorter.sort(value.split(/\s+/)).join(' ');
return sorter.sort(value.split(/[ \n\f\r]+/)).join(' ');
};
}
}
Expand Down
26 changes: 13 additions & 13 deletions dist/htmlminifier.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<div id="outer-wrapper">
<div id="wrapper">
<h1>HTML Minifier <span>(v3.4.3)</span></h1>
<h1>HTML Minifier <span>(v3.4.4)</span></h1>
<textarea rows="8" cols="40" id="input"></textarea>
<div class="minify-button">
<button type="button" id="minify-btn">Minify</button>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "html-minifier",
"description": "Highly configurable, well-tested, JavaScript-based HTML minifier.",
"version": "3.4.3",
"version": "3.4.4",
"keywords": [
"cli",
"compress",
Expand Down
4 changes: 2 additions & 2 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<head>
<meta charset="utf-8">
<title>HTML Minifier Tests</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.3.0.css">
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.3.2.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="https://code.jquery.com/qunit/qunit-2.3.0.js"></script>
<script src="https://code.jquery.com/qunit/qunit-2.3.2.js"></script>
<script src="../dist/htmlminifier.js"></script>
<script src="minifier.js"></script>
</body>
Expand Down

0 comments on commit 3e116df

Please sign in to comment.