Skip to content

Commit

Permalink
Alias @returns to @return
Browse files Browse the repository at this point in the history
Fixes #952
  • Loading branch information
hadley committed Nov 5, 2019
1 parent 08401f1 commit f84c3a6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ S3method(roxy_tag_parse,roxy_tag_rawRd)
S3method(roxy_tag_parse,roxy_tag_rdname)
S3method(roxy_tag_parse,roxy_tag_references)
S3method(roxy_tag_parse,roxy_tag_return)
S3method(roxy_tag_parse,roxy_tag_returns)
S3method(roxy_tag_parse,roxy_tag_section)
S3method(roxy_tag_parse,roxy_tag_seealso)
S3method(roxy_tag_parse,roxy_tag_slot)
Expand Down Expand Up @@ -178,6 +179,7 @@ S3method(roxy_tag_rd,roxy_tag_param)
S3method(roxy_tag_rd,roxy_tag_rawRd)
S3method(roxy_tag_rd,roxy_tag_references)
S3method(roxy_tag_rd,roxy_tag_return)
S3method(roxy_tag_rd,roxy_tag_returns)
S3method(roxy_tag_rd,roxy_tag_section)
S3method(roxy_tag_rd,roxy_tag_seealso)
S3method(roxy_tag_rd,roxy_tag_slot)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
S3method(generic, class)
```

* New `@returns` works the same way as `@return` (#952).

### R6

roxygen2 now supports documentation for R6 classes (#922).
Expand Down
4 changes: 4 additions & 0 deletions R/rd-markdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ format.rd_section_references <- function(x, ...) {
#' @export
roxy_tag_parse.roxy_tag_return <- function(x) tag_markdown(x)
#' @export
roxy_tag_parse.roxy_tag_returns <- roxy_tag_parse.roxy_tag_return
#' @export
roxy_tag_rd.roxy_tag_return <- function(x, base_path, env) {
rd_section("value", x$val)
}
#' @export
roxy_tag_rd.roxy_tag_returns <- roxy_tag_rd.roxy_tag_return
#' @export
format.rd_section_value <- function(x, ...) {
format_collapse(x, ...)
}
Expand Down
2 changes: 1 addition & 1 deletion R/tag-parser.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' either call one of the functions here, or directly set `x$val`.
#'
#' @param x A [roxy_tag] object to parse
#' @return A [roxy_tag] object with the `val` field set to the parsed value.
#' @returns A [roxy_tag] object with the `val` field set to the parsed value.
#' @name tag_parsers
#' @keywords internal
NULL
Expand Down

0 comments on commit f84c3a6

Please sign in to comment.