(atts: Attachment[])
| 89 | * Other chip kinds keep their own labels (a byte/line count or a file/dir name). Pure. |
| 90 | */ |
| 91 | export function renumberImageLabels(atts: Attachment[]): Attachment[] { |
| 92 | let n = 0; |
| 93 | return atts.map(a => (a.kind === 'image' ? { ...a, label: `Image #${++n}` } : a)); |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Remove the chip at `index` and renumber the remaining images. Out-of-range index |
no outgoing calls
no test coverage detected