Skip to content

Fix @inheritParams with multiple filtered tags - #1910

Merged
hadley merged 2 commits into
mainfrom
inherit-params-multi-filter
Jul 27, 2026
Merged

Fix @inheritParams with multiple filtered tags#1910
hadley merged 2 commits into
mainfrom
inherit-params-multi-filter

Conversation

@hadley

@hadley hadley commented Jul 27, 2026

Copy link
Copy Markdown
Member

Merging two inherit_params_args sections concatenates their sources and args, but the constructor used check_string(), so a second filtered @inheritParams always errored. It is now vectorised, like rd_section_inherit_dot_params().

The filter lookup also required exactly one match. Sources are deduplicated on merge, so repeating one (@inheritParams a x plus @inheritParams a z) gave a length-2 filter that was silently ignored; selections are now combined.

Fixes #1879

🤖 Generated with Claude Code

hadley added 2 commits July 27, 2026 08:14
`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.
@hadley
hadley merged commit 7ad9bee into main Jul 27, 2026
13 checks passed
@hadley
hadley deleted the inherit-params-multi-filter branch July 27, 2026 14:00
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

Successfully merging this pull request may close these issues.

inheritParams supports a single filtering instance

1 participant