Open cscheid opened 1 year ago
How about adding a filter to remove cell magic and an option to set the language of the output code block as desired (Same as knitr's lang
chunk option), as like https://github.com/CenterOnBudget/quarto-stata-facade?
I imagine the following. This would be versatile (works with any cell magic).
source
```{python}
#| output-language: sql
%%sql postgresql://will:longliveliz@localhost/shakes
select * from character
output
````markdown
```sql
select * from character
The problem is that this filter needs to happen before jupyter execution, and our current infrastructure has pandoc running after jupyter (and knitr).
With that said, we will be eventually changing quarto to support two pandoc passes (pre-engine and post-engine), but that's on a 1.5-1.6 timeline.
It might make sense for us to leverage cell magics to support (eg) a native
sql
cell in the same way that knitr does it.Pros:
knitr
engineCons:
If we continue to increase the ways in which different engines interpret
{language}
cells, I think it would be a good idea for quarto to be able toexplain
who runs what cells. I can imagine a TypeScript API that could do so.