Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sebffischer opened this issue Oct 18, 2023 · 1 comment

Comments

@sebffischer
Copy link

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()
}
@sebffischer sebffischer changed the title [Feature request] Allow renaming of a section when using the @inheritSection tag [Feature request] Allow renaming of a section when using the @inheritSection / @inherit tag Oct 18, 2023
@hadley
Copy link
Member

hadley commented Nov 1, 2023

This sounds like a useful feature, but I think implementing it is going to be quite hard, and unfortunately I don't think it'll ever make it to the top of our to do list. Even though I'm closing this issue, I really appreciate the feedback, and hope you'll continue to contribute in the future 😄

@hadley hadley closed this as completed Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants