Skip to content

Bug in call to tag_warning for noRd #418

@thomasp85

Description

@thomasp85

Parsing @nord results in a value of "\n". This raises a warning about the tag not supporting parameters. Worse the resulting tag_warning contains a bug:

> tags$noRd
function (x) 
{
    if (x$val != "") {
        tag_warning("has no parameters")  ### Should be tag_warning(x, "has no parameters")
    }
    else {
        x
    }
}
<environment: namespace:roxygen2>

Both this and #417 seems to be related to how tags are being parsed. Probably there are a problem with including "\n" for the last line in the tag..? If the inclusion is intentional then the tag parsing should be modified to take this into account.

Most tags include a test for x$val == "". These will never fire as tags will always contain "\n"

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