Hugo Granström

Results 161 comments of Hugo Granström

It screws up captureStdout. captureStdout must be placed outside nnContainer or else `nb.blk.output` will point to the wrong block:/

To expand on this, take this psuedocode: ```nim nbContainer: captureStdout(nb.blk.output): body # new blocks are create here, thus modifying nb.blk # here we set the captured string: nb.blk.output = readFile(tempfile)...

I just don't see how your proposed solution solves the problem we are having here. Namely how we can get the current block correctly so we can assign to it....

Ah yes that might work, maybe we don't require the `ident` to be `untyped` but can make one overload with `NbBlock` and one with `string`. The string version could be...

I think I see what you mean. If we do ```nim nbCode: echo 1 nbshow img echo 2 ``` it should show the "1", then the image, and last the...

So `nbShow` and every block you would want to show interlaced with captured text would have to use disableCaptureStdout? What about the disableCaptureStdouts in newNbBlock, that would split any text...

Hold on, I contradicted myself there, nbShow wouldn't have to manually use disableCapture as newNbBlock does it for us already. Then we just have the problem that we will be...

> Basically we are not using anymore the output field of nbCode block So far I'm following along, it's the specifics of how to split the capture into blocks that...

Let's take my example from above: ```nim nbCode: echo 1 nbshow img echo 2 ``` `nbShow` being a block has two `disableCaptureStdout` (because it has one `stdout.write` before `blockImpl` and...

> Well the block that captures nothing we can probably skip it (the moment we need to create the block that captures we check if it has actually captured something)....