tests/test-cran/test-reactor.md

Snapshot tests for get_context()

get_context('format') returns the output format inside fuse()

library(litedown)
fuse(text = c('```{r}', 'get_context("format")', '```'), output = 'markdown')
``` {.r}
get_context("format")
```

```
#> [1] "markdown"
```

get_context('input') is NULL when fuse() uses text input (no file)

fuse(text = c('```{r}', 'get_context("input")', '```'), output = 'markdown')
``` {.r}
get_context("input")
```

```
#> NULL
```


Try the litedown package in your browser

Any scripts or data that you put into this service are public.

litedown documentation built on July 11, 2026, 9:07 a.m.