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

R highlight syntax not working when using {r} in Edit mode #75

Open
AlfonsoRReyes opened this issue Nov 5, 2023 · 1 comment
Open

Comments

@AlfonsoRReyes
Copy link

First, congratulations and thanks for this great package. This is one of the first packages I install with any new vault I create.

I am using Obsidian to document code chunks, like a library of code that does something I require from time to time. I am using Editor Syntax Highlight in addition to another Obsidian extension Execute code, which enables Obsidian to run live code directly from the note.

There is just a little thing that is annoying and it is that syntax highlight doesn't work in Edit mode when the block has this form {r}.

Example this block will not render syntax highlighting in Edit mode:

```{r warning=FALSE}
library(factoextra)

pca <- prcomp(iris[,1:4], center = T, scale = T)

plot1 <- fviz_pca(pca, repel = T, labelsize = 3) +
    labs(title = "Biplot of iris data")

plot(plot1)

While this other block, will render nicely (please, see attached screenshot):

```r
library(factoextra)

pca <- prcomp(iris[,1:4], center = T, scale = T)

plot1 <- fviz_pca(pca, repel = T, labelsize = 3) +
    labs(title = "Biplot of iris data")

plot(plot1)

Is there any way to make code chunks of the form {r} work in Edit mode?

Thank you very much!

image

@roey-angel
Copy link

Yeah, this is really annoying. Have you found a workaround?

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

2 participants