Skip to content

Conversation

@gadenbuie
Copy link
Contributor

See quarto-dev/quarto#368 for context.

Both black and ruff format (and others) add spaces after single # starting a comment, so #| becomes # |. The Quarto VS Code extension supports formatting inside Python code chunks, so in general Quarto also supports # | for it's code cell metadata syntax.

Before Formatted

#| test: one
# | test: two
##| test: three

# | test: one
# | test: two
##| test: three

In quarto-dev/quarto#368 (comment) I proposed Quarto also support ##|, since the formatters don't mess with that. I included support for that here, considering we already use ## file:.

@gadenbuie gadenbuie requested review from cpsievert and wch January 16, 2025 16:05
@gadenbuie gadenbuie merged commit 17d3bc6 into main Jan 22, 2025
0 of 2 checks passed
@gadenbuie gadenbuie deleted the feat/quarto-comment-syntax branch January 22, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants