pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

Support prose in examples

Open t-kalinowski opened this issue 4 years ago • 0 comments

In reprex::reprex() and knitr::spin(), roxygen formatted comments get rendered as prose. It would be great if pkgdown did the same for examples.

Concretely, I'm proposing users could write something like:

#' A title
#'
#' @export
#' @examples
#' #' This gets rendered as prose
#' this_is_rendered_as_monospaced_code <- fn()
#' 
#' #' This also gets rendered as prose
#' this_is_also_rendered_as_monospaced_code <- fn()
fn <- function() { }

t-kalinowski avatar Dec 04 '21 18:12 t-kalinowski