e.g.
```{python}
#| output: asis
%%javascript
// some JS code
```
This is because cell magics need to be the first line of the cell.
Note that the keep-ipynb feature is really designed for debugging rather than for producing a final notebook for distribution (e.g. markdown constructs like citations and crossrefs are not resolved in this version). We should either resolve this or make it more clear in the documentation that keep-ipynb is for debugging intermediate representations (we could even change the filename to make this more clear).