Skip to content

Syntax highlighting in fenced code blocks #15237

Description

@t-kalinowski

In "source" mode for Quarto and R Markdown files, RStudio displays code chunks that will be evaluated with syntax highlighting:

image

However, if you remove the curly braces around {r}, the syntax highlighting disappears, even though the chunk is still identified as an "R" code chunk.

image

It would be helpful if the code chunk continued to display with syntax highlighting in this case.

(I realize I can spoof this by setting eval = FALSE, but the use case here is that I want to be able to copy-paste the document into a GitHub issue, and GitHub doesn't recognize {r} and prefers r.)

Activity

  1. added
    new
    on Sep 27, 2024
  2. ronblum commented on Sep 27, 2024

    @ronblum
    Contributor

    Note: This works in visual mode.

  3. added and removed
    new
    on Sep 27, 2024
  4. added this to the Mariposa Orchid milestone on Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions