Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

use pandoc as backend #19

@lorenzwalthert

Description

@lorenzwalthert

Seem like RStudio visual mode uses something like this to convert .Rmd into standard pandoc markdown:

pandoc -s -f markdown+backtick_code_blocks+fenced_code_attributes -t markdown -o new-README.Rmd README.Rmd

with code chunks:

``` {#r eval=FALSE}
a::b()
1
```

Maybe they could even expose the functionality. Also see: rstudio/rstudio#7922

If they don't want:

  • adapt header to required format above, i.e. prefix langauge with #, remove all commas (with regex).
  • render.
  • go through all headers and replace them with the old version.

Would be a nice pre-commit hook.

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