Permalink
Browse files

If units are not specified, we need to handle that too in the regex.

  • Loading branch information...
own3mall committed Mar 26, 2016
1 parent b512ef4 commit e9e43811e9c415ed91d0a405cfc72268f62af9a2
View
@@ -11,5 +11,6 @@ CVS/
build/classes
build/jar
build/build_tmp
build/yuicompressor*.jar
.project
.classpath
Binary file not shown.
@@ -496,10 +496,11 @@ public void compress(Writer out, int linebreakpos)
while (m.find()) {
String s = m.group();
s = s.replaceAll("(?<=[%|px|em|rem|vw]+)\\+", " + ");
s = s.replaceAll("(?<=[%|px|em|rem|vw]+)\\-", " - ");
s = s.replaceAll("(?<=[%|px|em|rem|vw]+)\\*", " * ");
s = s.replaceAll("(?<=[%|px|em|rem|vw]+)\\/", " / ");
s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\+", " + ");
s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\-", " - ");
s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\*", " * ");
s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\/", " / ");
m.appendReplacement(sb, s);
}
m.appendTail(sb);

0 comments on commit e9e4381

Please sign in to comment.