quarto-dev / quarto-dev/quarto-cli

code-link does not work if echo: true is being used

Open
#3,527 3 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Dec 11, 2023.

bug engines-knitr
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

If a package is loaded in a chunk where the execution option echo is set to false it seems that the downlit package does not find the corresponding function. It does not create a link.

---
format: 
  html: 
    code-link: true
---

```{r}
#| echo: false
library(ggplot2)

mtcars |> 
  ggplot(aes(x = mpg, y = disp)) +
    geom_point()
```

`filter()`, `ggplot()`

RStudio version: 2022.07.2 Build 576
R version: 4.2.2
quarto version: 1.2.269
OS: macOS Ventura 13.0.1

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.

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.