summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-05 21:29:07 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-05 21:30:13 +0200
commit81938dc2c9ae29429d6d8c0b558623a71096f2da (patch)
treea48768a540066371e9a973f87d3bce01f0064d35
parenta5416d9d7f51f7785e98a8e67e77685f4d123ebd (diff)
downloadmutti-web-81938dc2c9ae29429d6d8c0b558623a71096f2da.tar.gz
mutti-web-81938dc2c9ae29429d6d8c0b558623a71096f2da.tar.bz2
mutti-web-81938dc2c9ae29429d6d8c0b558623a71096f2da.zip
minify_html: Remove space after quoted attributes
-rw-r--r--Makefile2
-rw-r--r--minify_html.sed1
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9c344ba..5e79469 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
+#html_minify=./node_modules/.bin/html-minifier --html5 --remove-optional-tags --use-short-doctype --remove-attribute-quotes --remove-tag-whitespace
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 2a9761d..9e1f0e4 100644
--- a/minify_html.sed
+++ b/minify_html.sed
@@ -4,3 +4,4 @@ s/<\/\(body\|head\|html\)>//g
s/<\/\(li\|p\)>//g
s/="\([a-zA-Z0-9_:.\/#&;@-]*\)"/=\1/g
+s/\(="[^"]*"\) /\1/g