(cooked: string, raw: string)
| 342 | * @throws an error if the block is unterminated |
| 343 | */ |
| 344 | export function findEndOfBlock(cooked: string, raw: string): number { |
| 345 | for (let cookedIndex = 1, rawIndex = 1; cookedIndex < cooked.length; cookedIndex++, rawIndex++) { |
| 346 | if (raw[rawIndex] === '\\') { |
| 347 | rawIndex++; |
| 348 | } else if (cooked[cookedIndex] === BLOCK_MARKER) { |
| 349 | return cookedIndex; |
| 350 | } |
| 351 | } |
| 352 | throw new Error(`Unterminated $localize metadata block in "${raw}".`); |
| 353 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…