Skip to content

Add support for webr code chunks in Rmd/qmd documents#1229

Merged
lorenzwalthert merged 2 commits intor-lib:mainfrom
wurli:main
Sep 20, 2024
Merged

Add support for webr code chunks in Rmd/qmd documents#1229
lorenzwalthert merged 2 commits intor-lib:mainfrom
wurli:main

Conversation

@wurli
Copy link
Contributor

@wurli wurli commented Sep 19, 2024

Also modifies one of the unit tests to cover this use-case.

@lorenzwalthert
Copy link
Collaborator

Thanks. Can you please format the offending file with styler to make the pre-commit hook go test pass? Also, can you provide some links to web R in Rmd docs for me? I am not familiar with it.

@wurli
Copy link
Contributor Author

wurli commented Sep 19, 2024

Hi, thanks for looking at this :)

I've updated to fix the styler issue as requested.

Regarding webr in RMarkdown, now you mention it I think you're correct, I'm not sure RMarkdown has webr support. That said, in the case that someone is including webr chunks in an RMarkdown document and passing it through {styler}, I don't see why they wouldn't want these chunks styled like any other R code.

NB, the quarto-webr documentation only mentions the webr-r chunk type, but previously they advertised webr and AFAIK it's still a supported option, so I've included both for backwards compatibility.

@lorenzwalthert
Copy link
Collaborator

Great, thanks.

@lorenzwalthert lorenzwalthert self-requested a review September 20, 2024 16:10
@lorenzwalthert lorenzwalthert merged commit b477757 into r-lib:main Sep 20, 2024
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

Successfully merging this pull request may close these issues.

2 participants