coatless-rpkg / assignr

Tools for Educators Writing Assignments in RMarkdown
https://r-pkg.thecoatlessprofessor.com/assignr/
42 stars 7 forks source link

Switch to parsing with {parsermd} instead of regex #17

Open coatless opened 3 years ago

coatless commented 3 years ago

Promising new entrant that more intelligent reads through the structure of an RMarkdown/Markdown document.

c.f. https://github.com/rundel/parsermd/issues/17

coatless commented 2 years ago

Suggest changing over to new Knitr engine features in v1.37:

https://yihui.org/en/2022/01/knitr-news/

verbatim and embed look the most promising.

````{verbatim}
We can output arbitrary content verbatim.

```{r}
1 + 1

The content can contain inline code like r pi * 5^2, too.

```{embed, file="foo.R"}

Only issue is the new way of specifying code chunk options introduced in [v1.35](https://github.com/yihui/knitr/releases/tag/v1.35)

#### R style: 
#| echo = FALSE,
#| fig.width = 10

#### YAML style: 
#| echo: false
#| fig.width: 10