()
| 293 | } |
| 294 | |
| 295 | function updatePreviewLabel(): void { |
| 296 | if (!previewLabel || !previewInput) { |
| 297 | return |
| 298 | } |
| 299 | |
| 300 | const lines = previewInput.value ? previewInput.value.split('\n').length : 0 |
| 301 | const format = getPreviewFormat() |
| 302 | |
| 303 | previewLabel.textContent = `Preview · ${format} · ${lines} ${lines === 1 ? 'line' : 'lines'}` |
| 304 | } |
| 305 | |
| 306 | function getPreviewFormat(): string { |
| 307 | if (activeTarget === 'http') { |
no test coverage detected