quarto-dev / quarto-dev/quarto-cli

`code-fold` for non executable code

Open
#4,693 8 comments 13 reactions 1 assignee View on GitHub

@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:

code-fold

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.