(chunks: RMarkdownChunk[] = _getChunks(),
line: number = _getStartLine())
| 319 | } |
| 320 | |
| 321 | export async function runCurrentAndBelowChunks(chunks: RMarkdownChunk[] = _getChunks(), |
| 322 | line: number = _getStartLine()): Promise<void> { |
| 323 | const currentChunk = getCurrentChunk(chunks, line); |
| 324 | if (!currentChunk) { |
| 325 | return; |
| 326 | } |
| 327 | const currentChunkId = currentChunk.id; |
| 328 | const lastChunkId = chunks.length; |
| 329 | |
| 330 | const codeRanges: vscode.Range[] = []; |
| 331 | |
| 332 | for (let i = currentChunkId; i <= lastChunkId; i++) { |
| 333 | const chunk = chunks.find(e => e.id === i); |
| 334 | if (chunk) { |
| 335 | codeRanges.push(chunk.codeRange); |
| 336 | } |
| 337 | } |
| 338 | await runChunksInTerm(codeRanges); |
| 339 | } |
| 340 | |
| 341 | export async function runAllChunks(chunks: RMarkdownChunk[] = _getChunks()): Promise<void> { |
| 342 |
nothing calls this directly
no test coverage detected