aboutsummaryrefslogtreecommitdiff
path: root/node_modules/html-minifier/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/html-minifier/src
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/html-minifier/src')
-rw-r--r--node_modules/html-minifier/src/htmlminifier.js40
-rw-r--r--node_modules/html-minifier/src/htmlparser.js2
2 files changed, 21 insertions, 21 deletions
diff --git a/node_modules/html-minifier/src/htmlminifier.js b/node_modules/html-minifier/src/htmlminifier.js
index 5b9c9cf32..6910e15dd 100644
--- a/node_modules/html-minifier/src/htmlminifier.js
+++ b/node_modules/html-minifier/src/htmlminifier.js
@@ -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'
);
}
@@ -998,10 +998,10 @@ function minify(value, options, partialMarkup) {
if (!stackNoTrimWhitespace.length) {
squashTrailingWhitespace(tag);
}
- if (!_canTrimWhitespace(tag, attrs)) {
+ if (!_canTrimWhitespace(tag, attrs) || stackNoTrimWhitespace.length) {
stackNoTrimWhitespace.push(tag);
}
- if (!_canCollapseWhitespace(tag, attrs)) {
+ if (!_canCollapseWhitespace(tag, attrs) || stackNoCollapseWhitespace.length) {
stackNoCollapseWhitespace.push(tag);
}
}
diff --git a/node_modules/html-minifier/src/htmlparser.js b/node_modules/html-minifier/src/htmlparser.js
index 2195347dc..74695a01d 100644
--- a/node_modules/html-minifier/src/htmlparser.js
+++ b/node_modules/html-minifier/src/htmlparser.js
@@ -26,7 +26,7 @@
*
*/
- /* global ActiveXObject, DOMDocument */
+/* global ActiveXObject, DOMDocument */
'use strict';