quarto-dev / quarto-dev/quarto-cli
`code-fold` for non executable code
Open
@cscheid is already working on this.
Since Jun 11, 2025.
code-annotation
enhancement
html
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/4558
Originally posted by rleyvasal February 28, 2023
It would help presenters to have the ability to highlight code and also do code-fold when the code is only for demonstration in a language non executable such as scss.
At the moment code in R, Python, can use code-fold but if other languages are in a code block which is only highlighted, then the code is not fold-able.
Python code is foldable with code-fold but scss highlighted is not foldable as seen below:

Reproducible Code
---
title: "My document"
format:
html:
code-fold: true
code-summary: "Show code"
---
```{python}
#| eval: false
// Content.scss
@use 'colors' as colors;
body > content {
padding: 40px;
margin: auto;
max-width: 100%
}
```
Show code below folded
```scss
// Content.scss
@use 'colors' as colors;
body > content {
padding: 40px;
margin: auto;
max-width: 100%
}
```
Related
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.
Assessment
This issue has not been assessed yet.