projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4fd148
)
Combine concatenated strings on script minify.
author
Daniel Carl
<danielcarl@gmx.de>
Mon, 28 Oct 2013 21:04:01 +0000
(22:04 +0100)
committer
Daniel Carl
<danielcarl@gmx.de>
Mon, 28 Oct 2013 21:04:01 +0000
(22:04 +0100)
If there are string concatenated like "foo" + "bar", combine them to "foobar".
src/js2h.sh
patch
|
blob
|
history
diff --git
a/src/js2h.sh
b/src/js2h.sh
index
0aa6c04
..
90ed16a
100755
(executable)
--- 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 '"'