Hi, I think there might be a small bug with rendering qmd files to ipynb. When I render a theorem, the markdown in the Python notebook contains  an extra space, which means that the heading of the theorem doesn't appear in bold as intended. Minimum working example below.

### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/5032

<div type='discussions-op-text'>

<sup>Originally posted by **aletroux** March 30, 2023</sup>
Hi,

I've just discovered Quarto and am experimenting it with the aim of using it for teaching - it's a Python module so I'd be generating a mixture of notes (html/pdf) and ipynb notebooks. I have the following input file (I called it test.qmd)

```
::: {#thm-line}
# Line

The equation of any straight line, called a linear equation, can be written as:

$$
y = mx + b
$$
:::

::: proof
Here is the proof.
:::
```

When I render this file using "quarto test.qmd --to ipynb" I get a Python notebook with the following text:

```
<span class="theorem-title">**Theorem 1 (Line) **</span>The equation of
any straight line, called a linear equation, can be written as:

$$
y = mx + b
$$

<span class="proof-title">*Proof*. </span>Here is the proof.
```

I have two questions.

1) There is an extra space after "Theorem 1 (Line)" and before the "**" which means that the text isn't rendered in bold as intended. I wonder whether this is due to a problem with my markdown, or is it perhaps a bug? (Rendering either the qmd or the ipynb file to html or pdf doesn't have this problem...)

2) Is there a way to disable the html tags? I appreciate ipynb is an intermediate format for producing html, but it would be nice to be able to provide students with ipynb files without the extra markdown needed by Quarto, and without the html tags.</div>
cscheid
2023-03-31T12:17:21Z
aletroux
bug crossref jupyter
v1.4
open
Rendering ipynb from qmd - trouble with extra spaces
https://github.com/quarto-dev/quarto-cli/issues/5051