Fix Css parsing to ignore all whitespaces in @externs parsing.
@extern parsing was broken if there were newlines present.
Change-Id: I560698cf4f365144ede49a6e4c4bdfff9349b624
diff --git a/user/src/com/google/gwt/resources/css/GenerateCssAst.java b/user/src/com/google/gwt/resources/css/GenerateCssAst.java
index 2b264d3..4175fcc 100644
--- a/user/src/com/google/gwt/resources/css/GenerateCssAst.java
+++ b/user/src/com/google/gwt/resources/css/GenerateCssAst.java
@@ -478,9 +478,9 @@
}
void parseExternal(String atRule) throws CSSException {
- // @external .foo, bar; Drop the dots and commas
- String[] parts = atRule.substring(10, atRule.length() - 1).replaceAll(
- "(, *)|( +)", " ").replaceAll("\\.", "").split(" ");
+ // @external .foo, bar; Drop the dots, commas and ignore whitespace
+ String[] parts = atRule.substring("@external ".length(), atRule.length() - 1).replaceAll(
+ "(,|\\s)\\s*", " ").replaceAll("\\.", "").split(" ");
CssExternalSelectors externals = new CssExternalSelectors();
Collections.addAll(externals.getClasses(), parts);