pkgdown
pkgdown copied to clipboard
Mis-formatting of usage section for `<` S3 method
I am creating package documentation using roxygen 7.1.2 & pkgdown 2.0.2.
My functions are written as
#' Sort some objects
#' @param x,decreasing,na.last,\dots As in [`sort()`].
#' @export
sort.multiPhylo <- function(x, decreasing = FALSE, na.last = NA, ...) {
x # Function body goes here...
}
#' @rdname sort.multiPhylo
#' @export
`<.phylo` <- function(e1, e2) {
TRUE # Function body goes here...
}
The documentation in R is rendered as expected:
## S3 method for class 'multiPhylo'
sort(x, decreasing = FALSE, na.last = NA, ...)
## S3 method for class 'phylo'
e1 < e2
But the pkgdown site yields:
# S3 method for multiPhylo
sort(x, decreasing = FALSE, na.last = NA, ...)
# S3 method for phylo
<(e1, e2)
Note the html-encoding of <
and the arrangement of the function as <(e1, e2)
instead of e1 < e2
.
I misunderstood this on first reading, so I'll clear it up for others: The source of the page contains
&lt;(e1, e2)
so it renders as shown above.
Also ==(e1, e2)
Probably the same as #2303 (but this issue is about S3, not S4)
Yeah, definitely the same.