Skip to content

incorrect use of backslashes in .Rd files #967

@achubaty

Description

@achubaty

The latest version (7.0.0) breaks one of my .Rd files containing the following code in an example:

paths <- list("./aaa/zzz",
              "./aaa/zzz/",
              ".//aaa//zzz",
              ".//aaa//zzz/",
              ".\\aaa\\zzz",
              ".\\aaa\\zzz\\", ## <- the double backslashes should convert to quad-backslashes
              file.path(".", "aaa", "zzz"))

gets converted to this in the .Rd:

paths <- list("./aaa/zzz",
              "./aaa/zzz/",
              ".//aaa//zzz",
              ".//aaa//zzz/",
              ".\\\\aaa\\\\zzz",
              ".\\\\aaa\\\\zzz\\\", ## <- note the 3 trailing backslashes instead of 4
              file.path(".", "aaa", "zzz"))

this has the effect of escaping the closing quotation mark, which results in the warning

Warning: newline within quoted string 

As a workaround, I have commented out the offending line in the example, but this is a temporary solution.
PredictiveEcology/reproducible@fbf8bf6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorrd ✍️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions