File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,16 @@ function parseImportParams(params: ValueParser.ValueAstNode[]) {
86
86
continue
87
87
}
88
88
89
- if ( node . kind === 'function' && / ^ u r l $ / i . test ( node . value ) ) {
89
+ if ( node . kind === 'function' && node . value . toLowerCase ( ) === 'url' ) {
90
90
throw new Error ( 'url functions are not supported' )
91
91
}
92
92
93
93
if ( ! uri ) throw new Error ( 'Unable to find uri' )
94
94
95
- if ( ( node . kind === 'word' || node . kind === 'function' ) && / ^ l a y e r $ / i. test ( node . value ) ) {
95
+ if (
96
+ ( node . kind === 'word' || node . kind === 'function' ) &&
97
+ node . value . toLowerCase ( ) === 'layer'
98
+ ) {
96
99
if ( layer ) throw new Error ( 'Multiple layers' )
97
100
if ( supports ) throw new Error ( 'layers must be defined before support conditions' )
98
101
@@ -105,7 +108,7 @@ function parseImportParams(params: ValueParser.ValueAstNode[]) {
105
108
continue
106
109
}
107
110
108
- if ( node . kind === 'function' && / ^ s u p p o r t s $ / i . test ( node . value ) ) {
111
+ if ( node . kind === 'function' && node . value . toLowerCase ( ) === 'supports' ) {
109
112
if ( supports ) throw new Error ( 'Multiple support conditions' )
110
113
supports = ValueParser . toCss ( node . nodes )
111
114
continue
You can’t perform that action at this time.
0 commit comments