Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support #|, # | and ##| for quarto metadata comment indicators #197

Merged
merged 2 commits into from
Jan 22, 2025

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 wch and cpsievert January 16, 2025 16:05
src/parse-codeblock.ts Outdated Show resolved Hide resolved
@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.

2 participants