* Get the content of a block.
(block: DeepnoteBlock)
| 250 | * Get the content of a block. |
| 251 | */ |
| 252 | function getBlockContent(block: DeepnoteBlock): string | undefined { |
| 253 | // Blocks with direct content |
| 254 | if ('content' in block && typeof block.content === 'string') { |
| 255 | return block.content |
| 256 | } |
| 257 | |
| 258 | // Separator blocks show a horizontal line |
| 259 | if (block.type === 'separator') { |
| 260 | return '---' |
| 261 | } |
| 262 | |
| 263 | return undefined |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * Get color function for block type. |
no outgoing calls
no test coverage detected