You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chunks without code in them break Quarto syntax highlighting and outline in source editor #14544
RStudio Edition : Desktop
RStudio Version : RStudio 2024.04.0-daily+689 "Chocolate Cosmos" Daily (9ee2b6131e42e36e31cec48a4eb88d2e700e272c, 2024-04-10) for macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.04.0-daily+689 Chrome/120.0.6099.291 Electron/28.2.6 Safari/537.36, Quarto 1.4.553 (/Applications/quarto/bin/quarto)
OS Version : Mac OS Ventura 13.5 (22G74)
R Version : R version 4.3.3 (2024-02-29) -- "Angel Food Cake"
Steps to reproduce the problem
In a Quarto document insert some 1st and 2nd level headers and code chunks in each one. For one of the code chunks, add a chunk option but no code in it. (This comes up when that chunk option is ref-label, where you don't need to add more code, you just want to refer to an earlier chunk.)
Describe the problem in detail
The outline and the syntax highlighting for headers and chunks are broken for the remainder of the document.
For example, note the green first level header (Chapter 2) and pink curly braces for the last chunk as well as the lack of indentation for section headers in the document outline.
Things look ok in the visual editor.
Describe the behavior you expected
I expected things to look like the following even when that middle code chunk doesn't have any code in it.
Verified in RStudio Desktop 2024.04.0+725 on Windows 11 using the above example and intentionally messing it up in different ways. There's a separate old issue with the outline that I'll file separately.
Activity
ronblum commentedon Apr 16, 2024
Reproducible:
ronblum commentedon Apr 22, 2024
Verified in RStudio Desktop 2024.04.0+725 on Windows 11 using the above example and intentionally messing it up in different ways. There's a separate old issue with the outline that I'll file separately.