Pandoc's markdown verbatim format (e.g. `FOO`) is added to character string.
pandoc.verbatim.return(x, style = c("inline", "indent", "delim"), attrs = "")By default this function outputs (see: cat) the result. If you would want to catch the result instead, then call the function ending in .return.
John MacFarlane (2012): _Pandoc User's Guide_. https://johnmacfarlane.net/pandoc/README.html
# different styles/formats
pandoc.verbatim('FOO')
#> `FOO`
src <- c('FOO', 'indent', 'BAR' )
pandoc.verbatim(src)
#> `FOO indent BAR`
pandoc.verbatim.return(src)
#> [1] "`FOO indent BAR`"
pandoc.verbatim(c('FOOO\nBAR ', ' I do R'), 'indent')
#>
#> FOOO
#> BAR
#> I do R
pandoc.verbatim(c('FOOO\nBAR ', ' I do R'), 'delim')
#>
#> ```````
#> FOOO
#> BAR
#> I do R
#> ```````
# add highlighting and HTML/LaTeX ID and classes (even custom attribute)
pandoc.verbatim(c('cat("FOO")', 'mean(bar)'), 'delim', '.R #MyCode custom_var="10"')
#>
#> ```````{.R #MyCode custom_var="10"}
#> cat("FOO")
#> mean(bar)
#> ```````