Skip to content

Python code cells will separate # and | after formatting in quarto #9432

@psychelzh

Description

@psychelzh

System details:

Positron and OS details:

Positron Version: 2025.09.0 (user setup) build 139
Code - OSS Version: 1.103.0
Commit: 30e3d0a74e09a0f6640929822cb57a326671360e
Date: 2025-08-29T18:50:28.998Z
Electron: 37.2.3
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Windows_NT x64 10.0.26100

Session details:

Python 3.13.7

Describe the issue:

In Quarto document, Python code cells will separate # and | after formatting, which then causes the chunk header not working.

Steps to reproduce the issue:

  1. Create a new quarto document, say test.qmd.
  2. Input these lines and save
```{python}
#| label: test
#| echo: false

print("Hello, World!")
```
  1. Then you will find the header formatting is wrong:
Image

But for R code cells, it is normal:

Image

Expected or desired behavior:

Do not separate # and |

Were there any error messages in the UI, Output panel, or Developer Tools console?

None for now.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions