You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that Rd files are not generated correctly when % is included within a multi-line string in the example.
I want to examples include % inside multi-line characters something like this:
a<-"%"b<-"%"
For this, the following Rd file is in the correct format.
Note that the second % is not escaped.
\examples{
a<-"\%"b<-"%"
}
However, when roxygen2 generates an Rd file from a comment, the second % is also escaped, so the original example is not restored when converted to another format, such as Rd2txt().
roxygen2::roc_proc_text(
roxygen2::rd_roclet(),
r"(#' sample#' @examples#' a <- "%"#' b <- "#' %#' "foo<-function() 1
)")#> $foo.Rd#> % Generated by roxygen2: do not edit by hand#> % Please edit documentation in ./<text>#> \name{foo}#> \alias{foo}#> \title{sample}#> \usage{#> foo()#> }#> \description{#> sample#> }#> \examples{#> a <- "\%"#> b <- "#> \%#> "#> }
From pola-rs/r-polars#1065, maybe related to #904
I noticed that Rd files are not generated correctly when
%
is included within a multi-line string in the example.I want to examples include
%
inside multi-line characters something like this:For this, the following Rd file is in the correct format.
Note that the second
%
is not escaped.However, when roxygen2 generates an Rd file from a comment, the second
%
is also escaped, so the original example is not restored when converted to another format, such asRd2txt()
.Created on 2024-04-28 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: