* Get label for a text cell block (h1, h2, p, bullet, etc.)
(content: string, type: string)
| 140 | * Get label for a text cell block (h1, h2, p, bullet, etc.) |
| 141 | */ |
| 142 | function getTextCellLabel(content: string, type: string): string { |
| 143 | const trimmed = content.trim() |
| 144 | if (!trimmed) { |
| 145 | return `${type} (empty)` |
| 146 | } |
| 147 | return truncate(trimmed, MAX_LABEL_LENGTH) |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Truncate a string to max length, adding ellipsis if needed. |
no test coverage detected