| 1 |
src = ' |
| 2 |
--- |
| 3 |
output: |
| 4 |
html: |
| 5 |
options: |
| 6 |
embed_resources: false |
| 7 |
--- |
| 8 |
|
| 9 |
```{r} |
| 10 |
plot(1) |
| 11 |
``` |
| 12 |
' |
| 13 |
|
| 14 |
old = litedown::reactor(fig.path = 'foo') |
| 15 |
out = litedown::fuse(text = src, output = 'markdown') |
| 16 |
stopifnot('' %in% unlist(strsplit(out, '\n'))) |
| 17 |
unlink('foochunk-1-1.png') |
| 18 |
|
| 19 |
litedown::reactor(fig.path = 'foo/bar') |
| 20 |
out = litedown::fuse(text = src, output = 'markdown') |
| 21 |
stopifnot('' %in% unlist(strsplit(out, '\n'))) |
| 22 |
unlink('foo', recursive = TRUE) |
| 23 |
|
| 24 |
litedown::reactor(old) |