Skip to content

can't roxygenise file if string contains code that doesn't parse #1738

@mcol

Description

@mcol

Copy the following into a file:

#' Example
#'
#' Shows some buggy behaviour.
#'
#' ```
#' msg <- "Error in if (ncol(dat$y)) {: argument is of length zero"
#' ```
#' @name test
NULL

The following error is produced:

roxygen2::roxygenise()

# ℹ Loading test
# ✖ test.R:5: @details has mismatched braces or quotes.
# Writing test.Rd

The expectation is that there should be no error. This is a minimal example of a bug reported in r-lib/cli#803.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions