Skip to content
Permalink
Browse files

Merge pull request #249 from dracony/master

Fixed some bugs (#241 and #248)
  • Loading branch information
tml committed Nov 30, 2016
2 parents b3de528 + 6159944 commit ae2ef30979ec5fb4b1ca194acaa2affcd753e792
@@ -226,7 +226,7 @@ public void compress(Writer out, int linebreakpos)
// But, be careful not to turn "p :link {...}" into "p:link{...}"
// Swap out any pseudo-class colons with the token, and then swap back.
sb = new StringBuffer();
p = Pattern.compile("(^|\\})(([^\\{:])+:)+([^\\{]*\\{)");
p = Pattern.compile("(^|\\})((^|([^\\{:])+):)+([^\\{]*\\{)");
m = p.matcher(css);
while (m.find()) {
String s = m.group();
@@ -351,7 +351,7 @@ public void compress(Writer out, int linebreakpos)
// Replace 0 0 0 0; with 0.
css = css.replaceAll(":0 0 0 0(;|})", ":0$1");
css = css.replaceAll(":0 0 0(;|})", ":0$1");
css = css.replaceAll(":0 0(;|})", ":0$1");
css = css.replaceAll("(?<!flex):0 0(;|})", ":0$1");


// Replace background-position:0; with background-position:0 0;
@@ -0,0 +1,3 @@
.flex-text{
flex:0 0;
}
@@ -0,0 +1 @@
.flex-text{flex:0 0}
@@ -0,0 +1,3 @@
:first-child :last-child{
background-color:red
}
@@ -0,0 +1 @@
:first-child :last-child{background-color:red}

0 comments on commit ae2ef30

Please sign in to comment.
You can’t perform that action at this time.