Skip to content

Code cells missing when used in tab-groups #723

Description

@VeckoTheGecko

Describe the bug

context

Code cells in tab groups are not rendered when using the myst_nb extension for Sphinx.

expectation

The code cells to appear

bug

Source

---
jupytext:
  text_representation:
    extension: .md
    format_name: myst
kernelspec:
  display_name: Python 3
  language: python
  name: python3
---

# Code cells in tab groups

## Control: standalone code cell (should render)

```{code-cell} python
print("hello from standalone cell")
```

## Reproducer: code cells inside tab-set (cells absent in output)

`````{tab-set}

````{tab-item} Tab 1
```{code-cell} python
print("hello from tab 1")
```
````

````{tab-item} Tab 2
```{code-cell} python
print("hello from tab 2")
```
````

`````

Picture

Image
$ jupyter-book build mybook
ERROR ...

A minimal reproducer is available here https://github.com/VeckoTheGecko/repro-missing-code-cells-myst_nb using Pixi.

Simply clone the repo and run pixi run build, then open doc/_build/html to see the built files.

Reproduce the bug

See above

List your environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions