### Bug description

Hello dear quarto developers.
When upgrading to quarto 1.3, quarto changed the way to transform may `qmd` files with python executable cells to `html`.

This bug appeared after 1.3.146 that worked normally and current 1.3.340 where the first heading is moved to top of file as a title **when there is a notebook intermediate file**.

Example:


    Some paragraph

    ## This is first heading and not the title

    The first heading is transformed in title and placed at the top of the document.

    ## Exécution


    ```{python}
    print("Hello")
    ```



Will be rendered with `This is first heading and not the title` as the title in the top of the document in the title block. **But**, if the python cell is converted to normal code block(not executed)  `This is first heading and not the title`  stays where it is as a h2 heading like this was rendered in previous quarto versions.

It seems that the bug occurs when converting the `ipynb` file to `html` because in the notebook the first heading is preserved.

Example runned on fresh archlinux.

```
[ben@archben ~]$ quarto check

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.340
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.10
      Path: /usr/bin/python3
      Jupyter: 5.3.0
      Kernels: lua, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
```


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
cscheid
2023-04-30T18:11:54Z
benabel
bug jupyter triaged-to
Future
open
First heading transformed to title when dynamic python content
https://github.com/quarto-dev/quarto-cli/issues/5363