(scan: StyleDeclarationScan, ch: string, next: string)
| 145 | } |
| 146 | |
| 147 | function advanceStyleDeclarationScan(scan: StyleDeclarationScan, ch: string, next: string): void { |
| 148 | if (scan.quote) { |
| 149 | if (ch === "\\" && next) { |
| 150 | scan.skip = true; |
| 151 | return; |
| 152 | } |
| 153 | if (ch === scan.quote) scan.quote = null; |
| 154 | return; |
| 155 | } |
| 156 | if (ch === "'" || ch === '"') { |
| 157 | scan.quote = ch; |
| 158 | return; |
| 159 | } |
| 160 | if (ch === "(") scan.depth++; |
| 161 | else if (ch === ")") scan.depth = Math.max(0, scan.depth - 1); |
| 162 | } |
| 163 | |
| 164 | function splitStyleDeclarations(style: string): string[] { |
| 165 | const declarations: string[] = []; |
no outgoing calls
no test coverage detected