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

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

<sup>Originally posted by **astoeriko** May  3, 2023</sup>
Some of my figure captions are quite long, so I would like to split them into several lines in the source code for better readability. What is the right syntax for this? Based on the instructions for mermaid diagrams that I found [here](https://github.com/quarto-dev/quarto-cli/discussions/1816) I tried as follows:
        
    ```{python}
    #| fig-cap: |
    #|   This is a caption for my figure.
    #|   It is long, so I put it onto two lines
    import numpy as np
    import matplotlib.pyplot as plt
    plt.plot(np.arange(10))
    ```
But when I run `quarto render`, I get an error:

```
Executing 'test.ipynb'
  Cell 1/1...ERROR: 

None of the known patterns match for   It is long, so I put it onto two lines
```
It runs fine if I put all the caption onto one line, but this is impractical with caption that are several sentences long.

    ```{python}
    #| fig-cap: "This is a caption for my figure. It is long, so I put it onto two lines."
    import numpy as np
    import matplotlib.pyplot as plt
    plt.plot(np.arange(10))
    ```
</div>
cscheid
2023-05-04T07:56:00Z
cderv
bug upstream jupyter
open
Syntax for multi-line figure captions in Python code cells
https://github.com/quarto-dev/quarto-cli/issues/5413