File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import { propGetters } from './propGetters'
66const PROP_CHAR = `[-\\w]`
77
88// prop value consists of non-semis and no curly braces unless backslash-escaped.
9- const VALUE_CHAR = `(?:\\\\.|[^\\\\;{}])`
9+ // This uses [\s\S] instead of . because IE11 doesn't support the s flag.
10+ const VALUE_CHAR = `(?:\\\\[\\s\\S]|[^\\\\;{}])`
1011
1112// prettier-ignore
1213const PROP_PATT = (
@@ -29,7 +30,7 @@ const MEDIA_PATT = (
2930 `(\\s*\\{)` // brace & whitespace
3031)
3132
32- const MATCH_REGEXP = new RegExp ( `(?:${ PROP_PATT } |${ MEDIA_PATT } )` , `gs ` )
33+ const MATCH_REGEXP = new RegExp ( `(?:${ PROP_PATT } |${ MEDIA_PATT } )` , `g ` )
3334
3435export function transform ( rawValue : any ) {
3536 if ( typeof rawValue !== 'string' ) return rawValue
@@ -68,7 +69,7 @@ const QUERY_REGEXP = new RegExp(
6869 `(\\s*:\\s*)` + // colon & whitespace
6970 `([^\\)]*?)` + // capture prop value (non-greedy)
7071 `(\\s*\\))` , // close paren, whitespace
71- `gs `
72+ `g `
7273)
7374
7475function mediaTransform ( rawValue : string ) {
You can’t perform that action at this time.
0 commit comments