From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/html-minifier/src/htmlminifier.js | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'node_modules/html-minifier/src/htmlminifier.js') 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); } } -- cgit v1.2.3