(operator: string, style: string)
| 68 | } |
| 69 | |
| 70 | function extractOperators(operator: string, style: string) { |
| 71 | const selectors: string[] = []; |
| 72 | let searchStart = 0; |
| 73 | |
| 74 | while (searchStart < style.length) { |
| 75 | const match = findOperator(operator, style, searchStart); |
| 76 | |
| 77 | if (!match) { |
| 78 | break; |
| 79 | } |
| 80 | |
| 81 | const prefix = style.slice(searchStart, match.start); |
| 82 | |
| 83 | if (match.value !== undefined && /(?:^|[^\S\r\n])&\s*$/.test(prefix)) { |
| 84 | selectors.push(normalizeWhitespace(match.value)); |
| 85 | } |
| 86 | |
| 87 | searchStart = Math.max(match.end, match.start + 1); |
| 88 | } |
| 89 | |
| 90 | return selectors; |
| 91 | } |
| 92 | |
| 93 | function unwrapGlobalOperator(selector: string, out?: string[]) { |
| 94 | let result = ""; |
no test coverage detected