We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46afe9d commit 4ca9dc6Copy full SHA for 4ca9dc6
lib/css-parser.js
@@ -8,18 +8,15 @@ function isEmbedded (src) {
8
9
function getUrls (text) {
10
var urls = [];
11
- var urlMatch, url, isEmbeddedUrl, isDuplicatedUrl;
+ var urlMatch, url;
12
13
text = text.replace(commentRegexp, '');
14
15
while (urlMatch = urlsRegexp.exec(text)) {
16
// Match 2 group if '[@import] url(path)', match 5 group if '@import path'
17
url = urlMatch[2] || urlMatch[5];
18
19
- isEmbeddedUrl = isEmbedded(url);
20
- isDuplicatedUrl = urls.indexOf(url) !== -1;
21
-
22
- if (url && !isEmbeddedUrl && !isDuplicatedUrl) {
+ if (url && !isEmbedded(url) && urls.indexOf(url) === -1) {
23
urls.push(url);
24
}
25
0 commit comments