Open cy-james-lee opened 2 weeks ago
@cy-james-lee Thank you for raising the issue! I can reproduce this in RStudio Desktop 2024.04.1+735 on Windows 11.
Note: This is source mode only--it works in visual mode. Also, this works correctly in version 2023.12.1+402.
I experienced the same problem in source mode on macOS. In my case, it didn't work inside and outside Quarto blocks.
RStudio Edition : Desktop RStudio Version : 2024.04.0+735 OS Version : MacOS Sonoma 14.4.1 R Version : 4.4.0 (2024-04-24) -- "Puppy Cup" Quarto Version: 1.4.554
Indentation works with the previous RStudio Version 2023.12.1+402, but only with 2 spaces. The older version didn't respect changes (even after restarting RStudio) in the global and project configuration. (I didn't notice this before).
In visual mode, everything works in the older and the latest RStudio version.
I also noticed that collapsing code section doesn't work inside of callout blocks.
I always add session info at the end of Quarto inside of a collapsed callout like so:
::: {.callout-note collapse="true"}
## Session Info
```{r}
sessionInfo()
:::
I don't have the collapse button next to ## Session Info:
![image](https://github.com/rstudio/rstudio/assets/13931593/736e79c5-1f82-49ab-950f-905e8ac75547)
If I comment out the callout block enclosure, I get the collapse button back.
![image](https://github.com/rstudio/rstudio/assets/13931593/ad995df1-eb8f-4e73-8a5f-b6a5d0d9dae0)
@petzi53 Can you provide a brief example of code in which you're seeing the issue?
@cy-james-lee I believe that what you're seeing is discussed in issue #14642.
Also @d-morrison found that this happens with reformatting (cmd-shift-A or Menu Bar > Code > Reformat Code).
Regression caused by https://github.com/rstudio/rstudio/pull/14558.
This seems to occcur (in source editor) not only after callout block, but any ::: (eg. ::: column, ::: panel-tabset
System details
Steps to reproduce the problem
Describe the problem in detail
All lines are moved to the left end, without any indentation.
:::