quarto-dev / quarto-dev/quarto-cli

`code-tools` + `echo` does not behave consistently on ipynb/qmd

Open
#11,682 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug engines-jupyter
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

There is a weird unexpected interaction which changes depending on how the options are called on a Jupyter Notebook.

Assuming:

---
title: "Reproducible Quarto Document"
engine: jupyter
---

```{python}
print("Hello, world!")
```

```python
print("Goodbye, world!")
```

Converting it as a Jupyter Notebook via:

quarto convert index.qmd 
QMDIPYNB
Correct:
quarto render index.qmd --to html -M code-tools:true
image
Incorrect:
quarto render index.ipynb --to html -M code-tools:true
image
Correct:
quarto render index.qmd --to html -M code-tools:true -M echo:false
image
Incorrect:
quarto render index.ipynb --to html -M code-tools:true -M echo:false
image
Correct:
quarto render index.qmd --to html -M code-tools:true -M code-fold:true
image
Correct:
quarto render index.ipynb --to html -M code-tools:true -M code-fold:true
image
Correct:
quarto render index.qmd --to html -M code-tools:true -M code-fold:true -M echo:false
image
Incorrect:
quarto render index.ipynb --to html -M code-tools:true -M code-fold:true -M echo:false
image

Originally posted by @mcanouil in https://github.com/quarto-dev/quarto-cli/discussions/11661#discussioncomment-11560697

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the listed render commands using the QMD example and the converted index.ipynb. Compare the HTML output for each code-tools, echo, and code-fold combination; done means equivalent options behave consistently for both input forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jupyter-notebook
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.