* Get label for a markdown block - show first line.
(content: string)
| 124 | * Get label for a markdown block - show first line. |
| 125 | */ |
| 126 | function getMarkdownBlockLabel(content: string): string { |
| 127 | const lines = content.split('\n') |
| 128 | |
| 129 | for (const line of lines) { |
| 130 | const trimmed = line.trim() |
| 131 | if (trimmed) { |
| 132 | return truncate(trimmed, MAX_LABEL_LENGTH) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | return 'markdown (empty)' |
| 137 | } |
| 138 | |
| 139 | /** |
| 140 | * Get label for a text cell block (h1, h2, p, bullet, etc.) |
no test coverage detected