quarto-dev / quarto-dev/quarto-cli
SQL chucks appear different with R chunks when eval is false
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
I'm redoing my website using a Quarto blog. When I have post set to eval: false with a SQL code chunk and an R code chunk, it looks fine. When I remove the R part, it changes formatting.
To reproduce, I have a blog post with each of these options:
- Blog post without R chunk.
---
title: "Test without R"
date: "2022-08-24"
execute:
eval: false
---
```{sql test}
SELECT * FROM EXAMPLE;
```

2) Same blog post, but with a blank R chunk at the end.
---
title: "Test with R"
date: "2022-08-25"
execute:
eval: false
---
```{sql test}
SELECT * FROM EXAMPLE;
```
```{r}
```

The SQL section outputs are different.
Screenshot of the first blog post. Formatting does not have syntax highlighting.

Screenshot of the second blog post. This does have highlighting.

Screenshot of the home page.

I don't know why they don't match. I just updated to the newest Quarto version (but I think it was happening on the previous one too). This is on RStudio 2022.07.1 Build 554. "Spotted Wakerobin" for macOS, on Monterey.
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report from a single .qmd file using the shown SQL chunk, optional blank R chunk, and execute: eval: false setting. Compare the rendered SQL formatting and syntax highlighting with and without the R chunk; done means both cases produce matching SQL output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, sql
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100