Open devmotion opened 13 hours ago
QuartoNotebookRunner only handles top-level code blocks?
Yes, that's currently all that is implemented.
On purpose? Or is this limitation (and the example above) considered a bug?
This is an upstream discussion: https://github.com/quarto-dev/quarto-cli/issues/9970. Particularly: https://github.com/quarto-dev/quarto-cli/issues/9970#issuecomment-2163313909, since this package outputs ipynb JSON the same as Jupyter does.
I see, the explanation makes sense. From a user perspective, however, I think it's quite unfortunate, I think it would be a very useful feature. For instance, I had a list of different requirements and it would be nice to illustrate each of these requirements with a short code block or generated plot. Putting them later at a top-level introduced unnecessary separation and arguably made it more difficult to read.
The only ways we'll be able to resolve this is either:
Note that in quarto 1.6 you can use the new contents
shortcode for a workaround:
---
engine: julia
---
::: {#nested-codeblock}
```{julia}
"this should appear" * " in a list"
:::
Nice, I didn't know that this is possible!
I didn't either 😄 this issue just reminded me of the release notes of 1.6 and then I thought maybe one could be used to solve the other
I tried to add item-specific code to a Markdown list but it seems currently QuartoNotebookRunner only handles top-level code blocks?
A simple comparison with knitr:
Julia
test_list.qmd:
A screenshot of the resulting HTML file:
R
test_list_r.qmd: