View source: R/roxygen-examples-parse.R
roxygen_remove_extra_brace | R Documentation |
tools::parse_Rd()
outputSince tools::parse_Rd()
treats braces in quotes as literal braces when
determining brace symmetry, a brace might be added in error to the parsed
data (at the end). We'll remove one at the time, check if output is parsable
until no braces are left. If we end up with no braces left, we signal a
parsing error, otherwise, we return the initial (not parsable input due to
dont sequence) with the trailing braces removed.
roxygen_remove_extra_brace(parsed)
styler:::parse_roxygen(
c(
"#' @examples",
"#' x <- '{'",
"#' \\dontrun{",
"#' fu(x = 3)",
"#' }"
)
)
styler:::parse_roxygen(
c(
"#' @examples",
"#' x <- '{'",
"#' \\dontrun{",
"#' c('{', \"'{{{\" ,\"[\")",
"#' }"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.