quarto convert: support an option to retain empty code cells #11685
Closed
anandology
started this conversation in
Feature Requests
Replies: 1 comment 2 replies
-
This seems like a fine request to me - I don't truly understand why we're dropping empty code cells here. I'll open an issue to track. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
The
quarto convert
command when converting fromqmd
toipynb
, drops all the code cells which are empty. This may be fine in most use cases, there are cases where this is undesirable.It would be nice to have an option to retain empty code cells as well.
Sample Use Case
I teach programming courses and I use
quarto convert
to generateipynb files
fromqmd
sources. These notebooks are used by the students of the course. The following is an example where empty cells are needed.The issue
The third code cell in the above example gets dropped.
The work-around is to make the code cell not empty by adding a comment, but I would prefer to keep it empty.
The Code
The part of the code that drops empty cells is at:
https://github.com/quarto-dev/quarto-cli/blob/main/src/core/jupyter/jupyter.ts#L422
Beta Was this translation helpful? Give feedback.
All reactions