Skip to content

[Feature request] Allow renaming of a section when using the @inheritSection / @inherit tag #1519

Closed
@sebffischer

Description

@sebffischer

I find the @inheritSection and @inherit tags quite convenient! However one restriction that they have is that it is not possible to change the name of the section that is inherited. It would be great if this was possible.

Let's say I have some documentation as below:

#' @title Hello world
#' @description
#' Greets the world
#' @export
hello_world = function() {
  print("Hello world!")
}

I would like to be able to create another function g that inherits the roxygen2 @description content from function f, but under a different (section) name. I image this to work something like below:

#' @title Hello world
#' @description
#' Calls function `hello_world`, see section *hello world* for more information.
#' @inherit hello_world description: hello world 
#' Greets the world
#' @export
g = function() {
  hello_world()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions