Skip to content

code-link and code-line-numbers does not work together when both set to true #2036

@JauntyJJS

Description

@JauntyJJS

Hi,

I was running a simple Quarto document that just takes the mean of c(1,2,3) and wanted to know how code-link and code-line-numbers work.
The versions are Quarto 1.0.11, R 4.2.1 and RStudio 2022.07.1 Build 554.

Hopefully the issue reported can be reproduced.

I understand that both R packages downlit and xml2 need to be installed.

Below is the content of the Quarto document.

---
title: "CodeNumberVSCodeLink"
format:
  html:
    code-link: true
    code-line-numbers: true
---

## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.

```{r}
mean(c(1,2,3))

If I set code-link: true and code-line-numbers: false and click render, the hyperlink works

image

If I set code-link: false and code-line-numbers: true and click render, the code numbering works

image

However when I set both code-link: true and code-line-numbers: true and click render, only the the code numbering works.

image

Is there a reason for this behaviour ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamBug is in upstream library

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions