1 | 'use strict';
|
2 |
|
3 | const hasInterpolation = require('../utils/hasInterpolation');
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | module.exports = function (selector) {
|
12 |
|
13 | if (hasInterpolation(selector)) {
|
14 | return false;
|
15 | }
|
16 |
|
17 |
|
18 | if (selector.startsWith('%')) {
|
19 | return false;
|
20 | }
|
21 |
|
22 |
|
23 | if (/:extend(\(.*?\))?/.test(selector)) {
|
24 | return false;
|
25 | }
|
26 |
|
27 |
|
28 | if (/\.[\w-]+\(.*\).+/i.test(selector)) {
|
29 | return false;
|
30 | }
|
31 |
|
32 |
|
33 | if (selector.includes('<%') || selector.includes('%>')) {
|
34 | return false;
|
35 | }
|
36 |
|
37 | return true;
|
38 | };
|