File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ export function normalizeCSS(css: string): string {
88
88
css = StringWrapper . replaceAll ( css , / : \s / g, ':' ) ;
89
89
css = StringWrapper . replaceAll ( css , / ' / g, '"' ) ;
90
90
css = StringWrapper . replaceAll ( css , / } / g, '}' ) ;
91
- css = StringWrapper . replaceAllMapped ( css , / u r l \( \" ( .+ ) \\ " \) / g, ( match ) => `url(${ match [ 1 ] } )` ) ;
91
+ css = StringWrapper . replaceAllMapped ( css , / u r l \( ( \" | \s ) ( .+ ) ( \" | \s ) \) ( \s * ) / g,
92
+ ( match ) => `url("${ match [ 2 ] } ")` ) ;
92
93
css = StringWrapper . replaceAllMapped ( css , / \[ ( .+ ) = ( [ ^ " \] ] + ) \] / g,
93
94
( match ) => `[${ match [ 1 ] } ="${ match [ 2 ] } "]` ) ;
94
95
return css ;
Original file line number Diff line number Diff line change @@ -155,10 +155,14 @@ export function main() {
155
155
expect ( css ) . toEqual ( 'x[a] y[a] {}' ) ;
156
156
} ) ;
157
157
158
- it ( 'should pass through @import directives' , ( ) => {
159
- var styleStr = '@import url("https://fonts.googleapis.com/css?family=Roboto");' ;
160
- var css = s ( styleStr , 'a' ) ;
161
- expect ( css ) . toEqual ( styleStr ) ;
162
- } ) ;
158
+ // TODO: can't work in Firefox, see https://bugzilla.mozilla.org/show_bug.cgi?id=625013
159
+ // Issue opened to track that: https://github.com/angular/angular/issues/4628
160
+ if ( ! browserDetection . isFirefox ) {
161
+ it ( 'should pass through @import directives' , ( ) => {
162
+ var styleStr = '@import url("https://fonts.googleapis.com/css?family=Roboto");' ;
163
+ var css = s ( styleStr , 'a' ) ;
164
+ expect ( css ) . toEqual ( styleStr ) ;
165
+ } ) ;
166
+ }
163
167
} ) ;
164
168
}
You can’t perform that action at this time.
0 commit comments