From: Daniel Carl Date: Mon, 28 Oct 2013 21:04:01 +0000 (+0100) Subject: Combine concatenated strings on script minify. X-Git-Url: https://git.owens.tech/assets/favicon.png/assets/favicon.png/git?a=commitdiff_plain;h=732facc6bdf395730bed39f1bb7cb93b6d2e6bfe;p=vimb.git Combine concatenated strings on script minify. If there are string concatenated like "foo" + "bar", combine them to "foobar". --- diff --git a/src/js2h.sh b/src/js2h.sh index 0aa6c04..90ed16a 100755 --- a/src/js2h.sh +++ b/src/js2h.sh @@ -6,6 +6,7 @@ cat $1 | \ sed -e 's:/\*[^*]*\*/::g' \ -e 's|[ ]\{2,\}| |g' \ -e "s|[ ]\{0,\}\([-!?<>:=(){};+\&\"',\|]\)[ ]\{0,\}|\1|g" \ + -e 's|"+"||g' \ -e 's|\\|\\\\|g' \ -e 's|"|\\"|g' echo '"'