Skip to content

bug in test for multiline @export tag #417

@thomasp85

Description

@thomasp85

When parsing and checking the tags the existence of "\n" after @export is considered equal with a multiline tag and raises a warning - the offending code is in tags$export

tags$export
function (x) 
{
    if (str_detect(x$val, "\n")) {
        tag_warning(x, "may only span a single line")
    }
    else if (!rdComplete(x$val)) {
        tag_warning(x, "mismatched braces or quotes")
    }
    else {
        x$val <- str_split(str_trim(x$val), "\\s+")[[1]]
        x
    }
}
<environment: namespace:roxygen2>

This approach means that the following oxygen comment raises a warning:

#' @export
#' 

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