11/*!
2- * HTMLMinifier v3.3.2 (http://kangax.github.io/html-minifier/)
2+ * HTMLMinifier v3.3.3 (http://kangax.github.io/html-minifier/)
33 * Copyright 2010-2017 Juriy "kangax" Zaytsev
44 * Licensed under the MIT license
55 */
@@ -32197,20 +32197,10 @@ var trimWhitespace = String.prototype.trim ? function(str) {
3219732197 return str.replace(/^\s+/, '').replace(/\s+$/, '');
3219832198};
3219932199
32200- function compressWhitespace(spaces) {
32201- return spaces === '\t' ? '\t' : spaces.replace(/(^|\xA0+)[^\xA0]+/g, '$1 ');
32202- }
32203-
3220432200function collapseWhitespaceAll(str) {
32205- return str && str.replace(/\s+/g, compressWhitespace);
32206- }
32207-
32208- function compressWhitespaceLeft(spaces) {
32209- return spaces === '\t' ? '\t' : spaces.replace(/^[^\xA0]+/, '').replace(/(\xA0+)[^\xA0]+/g, '$1 ') || ' ';
32210- }
32211-
32212- function compressWhitespaceRight(spaces) {
32213- return spaces === '\t' ? '\t' : spaces.replace(/[^\xA0]+(\xA0+)/g, ' $1').replace(/[^\xA0]+$/, '') || ' ';
32201+ return str && str.replace(/\s+/g, function(spaces) {
32202+ return spaces === '\t' ? '\t' : spaces.replace(/(^|\xA0+)[^\xA0]+/g, '$1 ');
32203+ });
3221432204}
3221532205
3221632206function collapseWhitespace(str, options, trimLeft, trimRight, collapseAll) {
@@ -32227,11 +32217,23 @@ function collapseWhitespace(str, options, trimLeft, trimRight, collapseAll) {
3222732217 }
3222832218
3222932219 if (trimLeft) {
32230- str = str.replace(/^\s+/, !lineBreakBefore && options.conservativeCollapse ? compressWhitespaceLeft : '');
32220+ str = str.replace(/^\s+/, function(spaces) {
32221+ var conservative = !lineBreakBefore && options.conservativeCollapse;
32222+ if (conservative && spaces === '\t') {
32223+ return '\t';
32224+ }
32225+ return spaces.replace(/^[^\xA0]+/, '').replace(/(\xA0+)[^\xA0]+/g, '$1 ') || (conservative ? ' ' : '');
32226+ });
3223132227 }
3223232228
3223332229 if (trimRight) {
32234- str = str.replace(/\s+$/, !lineBreakAfter && options.conservativeCollapse ? compressWhitespaceRight : '');
32230+ str = str.replace(/\s+$/, function(spaces) {
32231+ var conservative = !lineBreakAfter && options.conservativeCollapse;
32232+ if (conservative && spaces === '\t') {
32233+ return '\t';
32234+ }
32235+ return spaces.replace(/[^\xA0]+(\xA0+)/g, ' $1').replace(/[^\xA0]+$/, '') || (conservative ? ' ' : '');
32236+ });
3223532237 }
3223632238
3223732239 if (collapseAll) {
0 commit comments