rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.57k stars 1.08k forks source link

Collapse arrow for section headers no longer visible after inserting div #14642

Open DanOvando opened 2 weeks ago

DanOvando commented 2 weeks ago

System details

RStudio Edition : <!-- Desktop  -->
RStudio Version : 2024.04.0+735 (2024.04.0+735)
OS Version      :  macOS 14.4.1 (23E224)
R Version       :  4.4.0

Steps to reproduce the problem

  1. Open RStudio

  2. Open a .qmd file

  3. Add section header (e.g. # Results )

  4. Add a div after the section header, followed by another section header

    
    # Results

::: {#refs} :::

Figures



### Describe the problem in detail

Code folding arrows disappear from section headers following inclusing of a div in quarto document. See screenshot below; code folding arrow present for `# References`, but not for `# Figures`. If div is removed, code folding arrow returns to `# Figures`

![Screenshot 2024-05-02 at 9 30 21 AM](https://github.com/rstudio/rstudio/assets/8096183/e6f86260-6f55-4a4b-a619-98b46f4fdfbb)

### Describe the behavior you expected

Code folding arrows should still be present in section headers of .qmd files opened in the RStudio IDE following inclusion of a div. 

<!-- 
Please keep the below portion in your issue, and check `[x]` the applicable boxes.
-->

- [X ] I have read the guide for [submitting good bug reports](https://github.com/rstudio/rstudio/wiki/Writing-Good-Bug-Reports).
- [ X] I have installed the latest version of RStudio, and confirmed that the issue still persists.
- [ ] If I am reporting an RStudio crash, I have included a [diagnostics report](https://support.posit.co/hc/en-us/articles/200321257-Running-a-Diagnostics-Report).
- [ X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
ronblum commented 2 weeks ago

@DanOvando Thank you for raising the issue! I can also reproduce this in RStudio Desktop 2023.03.2+454 on Windows 11 using R 4.3.3. We'll review this issue as we continue development of RStudio.

gtritchie commented 1 week ago

This also happens on RStudio 2023.12.1+402 and 2024.09.1+494.

The arrow for the second header is missing, but still there for the first header:

Image