Fix @inheritParams with multiple filtered tags - #1910
Merged
Conversation
`rd_section_inherit_params_args()` used `check_string()`, but merging two sections concatenates their sources and args, so a second filtered `@inheritParams` always errored. The constructor is now vectorised, like `rd_section_inherit_dot_params()`. The filter lookup also required exactly one match. Since sources are deduplicated by `merge.rd_section_inherit()`, repeating a source (`@inheritParams a x` plus `@inheritParams a z`) yielded a length-2 filter that was silently ignored; selections are now combined. Fixes #1879
Pasting the filters together made them a single sequential select, so `@inheritParams a x` plus `@inheritParams a -x` inherited nothing and the result depended on tag order. Each tag now selects independently and the selections are unioned. Empty filters are also retained now, so an unfiltered `@inheritParams a` inherits every parameter even if another tag filters the same source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging two
inherit_params_argssections concatenates their sources and args, but the constructor usedcheck_string(), so a second filtered@inheritParamsalways errored. It is now vectorised, likerd_section_inherit_dot_params().The filter lookup also required exactly one match. Sources are deduplicated on merge, so repeating one (
@inheritParams a xplus@inheritParams a z) gave a length-2 filter that was silently ignored; selections are now combined.Fixes #1879
🤖 Generated with Claude Code