Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #326 build error introduced in #312. #327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/com/yahoo/platform/yui/compressor/CssCompressor.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ public void compress(Writer out, int linebreakpos)
// remove unnecessary semicolons
css = css.replaceAll(";+}", "}");

// Replace 0(px,em) with 0. (don't replace seconds are they are needed for transitions to be valid)
String oldCss;

// Replace 0(px,em) with 0. (don't replace seconds are they are needed for transitions to be valid)
p = Pattern.compile("(?i)(^|: ?)((?:[0-9a-z-.]+ )*?)?(?:0?\\.)?0(?:px|em|in|cm|mm|pc|pt|ex|deg|g?rad|k?hz)");
do {
oldCss = css;
Expand All @@ -338,7 +339,6 @@ public void compress(Writer out, int linebreakpos)
} while (!(css.equals(oldCss)));

// We do the same with % but don't replace the 0% in keyframes
String oldCss;
p = Pattern.compile("(?i)(: ?)((?:[0-9a-z-.]+ )*?)?(?:0?\\.)?0(?:%)");
do {
oldCss = css;
Expand Down