Skip to content

SQL chucks appear different with R chunks when eval is false #2137

@WilliamTylerBradley

Description

@WilliamTylerBradley

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:

  1. Blog post without R chunk.
---
title: "Test without R"
date: "2022-08-24"
execute: 
  eval: false
---

```{sql test}
SELECT * FROM EXAMPLE;
```

![Test without R code](https://user-images.githubusercontent.com/15098268/186791358-28b8b09a-77f0-4d36-948d-79c68c563e9c.png)


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}
```

Test with R code


The SQL section outputs are different.

Screenshot of the first blog post. Formatting does not have syntax highlighting.
Test without R

Screenshot of the second blog post. This does have highlighting.
Test with R

Screenshot of the home page.
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions