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

Function getSourceForBlock

packages/convert/src/deepnote-to-jupyter.ts:190–200  ·  view source on GitHub ↗
(block: DeepnoteBlock, jupyterCellType: 'code' | 'markdown', content: string)

Source from the content-addressed store, hash-verified

188}
189
190function getSourceForBlock(block: DeepnoteBlock, jupyterCellType: 'code' | 'markdown', content: string): string {
191 if (jupyterCellType === 'markdown') {
192 return createMarkdown(block)
193 }
194
195 if (block.type === 'code') {
196 return content
197 }
198
199 return createPythonCode(block)
200}
201
202function convertBlockTypeToJupyter(blockType: string): 'code' | 'markdown' {
203 return isMarkdownBlockType(blockType) ? 'markdown' : 'code'

Callers 1

Calls 2

createMarkdownFunction · 0.90
createPythonCodeFunction · 0.90

Tested by

no test coverage detected