MCPcopy Index your code
hub / github.com/deepnote/deepnote / getMarkdownBlockLabel

Function getMarkdownBlockLabel

packages/cli/src/utils/block-label.ts:126–137  ·  view source on GitHub ↗

* Get label for a markdown block - show first line.

(content: string)

Source from the content-addressed store, hash-verified

124 * Get label for a markdown block - show first line.
125 */
126function 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.)

Callers 1

getBlockLabelFunction · 0.85

Calls 1

truncateFunction · 0.85

Tested by

no test coverage detected