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

Support curly braces for defining "chunk options" in fenced code blocks of markdown documents #28648

Closed
jdidion opened this issue Jun 13, 2017 · 2 comments
Assignees
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality markdown Markdown support issues

Comments

@jdidion
Copy link

jdidion commented Jun 13, 2017

Rmarkdown (http://rmarkdown.rstudio.com/) enables creation of reproducible documents using R. The main deviation of Rmarkdown from CommonMark is the use of curly braces in the header of fenced code blocks to define options related to the rendering of the figure/table described in the chunk. It would be nice if VS Code does proper syntax highlighting of code blocks in Rmarkdown documents.

  • VSCode Version: 1.1.3

Example code block:

```{r include=FALSE, pdf.width=100px}
ggplot(foo, aes(x=bar, y=baz)) + geom_boxplot()
```
@ramya-rao-a ramya-rao-a added the markdown Markdown support issues label Jun 13, 2017
@mjbvz mjbvz added *extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality labels Jun 13, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 13, 2017

There are two parts to this:

  • Syntax highlighting of the codeblock in the editor
  • Correct rendering of the fenced code block in the markdown preview

I believe that both components should come from an extension rather than the core markdown extension.

For the syntax highlighting, take a look at https://github.com/mjbvz/vscode-fenced-code-block-grammar-injection-example

For the preview rendering, take a look at #22916

@mjbvz mjbvz removed their assignment Jun 13, 2017
@mjbvz mjbvz removed the *extension-candidate Issue identified as good extension implementation label Mar 1, 2018
@mjbvz mjbvz self-assigned this Mar 1, 2018
@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label Mar 1, 2018
@vscodebot
Copy link

vscodebot bot commented Mar 1, 2018

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Mar 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality markdown Markdown support issues
Projects
None yet
Development

No branches or pull requests

3 participants