(at: number, quote: number)
| 330 | |
| 331 | /** The offset after the quoted attribute value at `at`, or -1. */ |
| 332 | const attributeEnd = (at: number, quote: number): number => { |
| 333 | let j = at + 1; |
| 334 | while (j < n) { |
| 335 | const c = source.charCodeAt(j); |
| 336 | if (c === quote) return j + 1; |
| 337 | if (c === Ch.OpenBrace && host === 'svelte') { |
| 338 | // `class="row {odd ? "odd" : ''}"`: the expression may hold the quote. |
| 339 | const end = expressionEnd(j, 0); |
| 340 | j = end < 0 ? j + 1 : end; |
| 341 | } else j++; |
| 342 | } |
| 343 | wasted += j - at; |
| 344 | return -1; |
| 345 | }; |
| 346 | |
| 347 | /** The offset after the tag that starts at `at`, or `at + 1` when no tag does (`a < b`). */ |
| 348 | const tagEnd = (at: number): number => { |
no test coverage detected