parse_roxygen: Parse roxygen comments into text

View source: R/roxygen-examples-parse.R

parse_roxygenR Documentation

Parse roxygen comments into text

Description

Used to parse roxygen code examples. Removes line break before ⁠\\dontrun{...}⁠ and friends because it does not occur for segments other than ⁠\\dont{...}⁠ and friends.

Usage

parse_roxygen(roxygen)

Arguments

roxygen

Roxygen comments.

Examples

styler:::parse_roxygen(c(
  "#' @examples",
  "#' 1+  1"
))
styler:::parse_roxygen(c(
  "#' @examples 33",
  "#'1+  1"
))

styler documentation built on Aug. 29, 2023, 5:10 p.m.