(text: string, end: number)
| 383 | } |
| 384 | |
| 385 | function countNewlines(text: string, end: number): number { |
| 386 | let n = 0; |
| 387 | for (let i = 0; i < end; i++) if (text.charCodeAt(i) === 10) n++; |
| 388 | return n; |
| 389 | } |
| 390 | |
| 391 | /** The full source line containing `index`, trimmed and capped for display. */ |
| 392 | function snippetAround(text: string, index: number): string { |
no outgoing calls
no test coverage detected