Skip to content

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

Open
@AlfonsoRReyes

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions