MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / runAllChunks

Function runAllChunks

src/rmarkdown/chunks.ts:341–355  ·  view source on GitHub ↗
(chunks: RMarkdownChunk[] = _getChunks())

Source from the content-addressed store, hash-verified

339}
340
341export async function runAllChunks(chunks: RMarkdownChunk[] = _getChunks()): Promise<void> {
342
343 const firstChunkId = 1;
344 const lastChunkId = chunks.length;
345
346 const codeRanges: vscode.Range[] = [];
347
348 for (let i = firstChunkId; i <= lastChunkId; i++) {
349 const chunk = chunks.find(e => e.id === i);
350 if (chunk?.eval) {
351 codeRanges.push(chunk.codeRange);
352 }
353 }
354 await runChunksInTerm(codeRanges);
355}
356
357async function goToChunk(chunk: RMarkdownChunk) {
358 // Move cursor 1 line below 'chunk start line'

Callers

nothing calls this directly

Calls 2

runChunksInTermFunction · 0.90
_getChunksFunction · 0.85

Tested by

no test coverage detected