В Fri, 21 Jul 2023 15:14:09 +0200
Antoine Fabri <[email protected]> пишет:
> On a closer look it seems like roxygen2 introduces those, when using
> markdown backtick quoting, if the quoted content is not syntactic. For
> instance:
>
> #' `c(c(1)`
> #' `c(c(1))`
>
> Will convert the first line to `\verb{c(c(1)}` and the second to
> `\code{c(c(1))}`.
roxygen2 tries to do the right thing here. As defined in "Parsing Rd
files" [*], \code{} blocks are supposed to contain syntactically valid
R code. When something that is not valid R is given in a Markdown code
block, roxygen2 should not output \code{}, so it outputs \verb{}.
Also, unlike in LaTeX as understood by tools::parseLatex(), \verb{}
blocks use the {} braces in R documentation, and are understood
correctly by tools::parse_Rd(). Perhaps you also need tools::parse_Rd()?
--
Best regards,
Ivan
[*] https://developer.r-project.org/parseRd.pdf
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel