Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code: Problem with identifying code chunk in the presence of complex structure #521

Open
juliasilge opened this issue Aug 23, 2024 · 2 comments

Comments

@juliasilge
Copy link
Collaborator

One of our Positron users has reported a problem with the Quarto extension identifying a code chunk in their real and complicated document: posit-dev/positron#4467

I can reproduce the problem in VS Code as well. I just spent some time simplifying the document and the problem only crops up with a pretty complicated structure. I apologize 😬 but here is what I came up with:

---
title: "Here is my great title"
format: html
engine: knitr
---

# Top level

::: {.border}
Phasellus ac neque at ligula accumsan rutrum a eget ligula.
:::

## Second level 1

::: {.border}
Nulla ac nunc imperdiet, ornare dui ut, dignissim ipsum.
:::

### Third level 1

::: {.border}
Donec dapibus dui sed tincidunt cursus.
:::

### Third level 2

::: {.border}
Duis vitae justo id risus dictum mollis.
:::

### Third level 3

::: {.border}
Integer vel odio egestas, dictum enim non, lobortis nibh.
:::

### Third level 4

::: {.border}
Nam imperdiet dolor non varius commodo.
:::

::: {.border}
Praesent id dolor vel metus scelerisque scelerisque quis sed magna.
:::

::: {.border}
Aliquam laoreet dui tincidunt mauris vestibulum faucibus.
:::

### Third level 5

::: {.border}
Nullam ut nibh ultrices nibh sollicitudin tristique eu ac dui.
:::

## Second level 2

### Third level 6

::: {.border}
Donec dapibus dui sed tincidunt cursus.
:::

::: {.border}
Curabitur ac metus non neque finibus posuere.
:::

### Third level 7

::: {.border}
Ut quis turpis at dui vestibulum interdum.
:::

### Third level 8

::: {.border}
Donec dapibus dui sed tincidunt cursus.
:::

::: {.border}
Proin ut magna imperdiet neque consequat dictum ut in massa.
:::

::: {.border}
Donec suscipit nibh sed sollicitudin scelerisque.
:::

::: {.border}
Duis at sapien non erat dictum finibus ut id turpis.
:::

## Second level 3

::: {.border}
Aliquam in risus tempus, varius leo nec, aliquet orci.
:::

::: {.border}
Curabitur viverra ipsum sit amet lorem efficitur hendrerit.
:::

::: {.border}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
:::

::: {.border}

```{r}
1 + 1
```

:::

This all looks to be valid and straightforward Quarto syntax, if a lot of it. Almost any change you make to the document makes the cell get picked up again:

Screen.Recording.2024-08-23.at.1.18.48.PM.mov
@cscheid
Copy link
Contributor

cscheid commented Aug 23, 2024

Just to clarify - rendering is ok, but the VS Code extension is getting confused?

@grasshoppermouse
Copy link

Yes, the qmd renders correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants