summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-05 21:35:24 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-05 21:35:24 +0200
commit29260061973e2259b603f57d7892b08c47e25cbf (patch)
tree498754963818d52b9042f6961cf5980e43ad1724
parent81938dc2c9ae29429d6d8c0b558623a71096f2da (diff)
downloadmutti-web-29260061973e2259b603f57d7892b08c47e25cbf.tar.gz
mutti-web-29260061973e2259b603f57d7892b08c47e25cbf.tar.bz2
mutti-web-29260061973e2259b603f57d7892b08c47e25cbf.zip
Revert "minify_html: Remove space after quoted attributes"
This reverts commit 81938dc2c9ae29429d6d8c0b558623a71096f2da. As validator.w3.org throws the following error: No space between attributes. At line 2, column 4862 Box="0 0 55 55"id=checkmark><p Cause of this revert we're back at a 99% html minification score gtmetrix now.
-rw-r--r--Makefile2
-rw-r--r--minify_html.sed1
2 files changed, 1 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5e79469..9c344ba 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ fix_doctype=sed 's/ SYSTEM "about:legacy-compat"//'
to_html=$(fix_doctype) | xsltproc xsl/convert-xhtml-to-html.xsl - | $(fix_doctype) | sed -e 's/<br><\/br>/<br>/g' -e 's/<\/img>//g' -e 's/<\/link>//g' -e 's/<\/meta>//g' -e 's/<html xmlns="http:\/\/www.w3.org\/1999\/xhtml"/<html/'
-#html_minify=./node_modules/.bin/html-minifier --html5 --remove-optional-tags --use-short-doctype --remove-attribute-quotes --remove-tag-whitespace
+#html_minify=./node_modules/.bin/html-minifier --html5 --remove-optional-tags --use-short-doctype --remove-attribute-quotes
html_minify=sed -f minify_html.sed
pages=$(shell xsltproc xsl/main_filenames.xsl main.xml)
diff --git a/minify_html.sed b/minify_html.sed
index 9e1f0e4..2a9761d 100644
--- a/minify_html.sed
+++ b/minify_html.sed
@@ -4,4 +4,3 @@ s/<\/\(body\|head\|html\)>//g
s/<\/\(li\|p\)>//g
s/="\([a-zA-Z0-9_:.\/#&;@-]*\)"/=\1/g
-s/\(="[^"]*"\) /\1/g