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

Allow returning parallel variants from addVariant or matchVariant callback functions #8455

Merged
merged 9 commits into from May 31, 2022

Conversation

RobinMalfait
Copy link
Contributor

This PR allows you to return parallel variants from a variant function.

Caveat: this now belongs to the same plugin and is not registered as
separate variants which means that sort order can differ.
Now that a variant function can return a list of variant functions from
within the plugin, we have to make sure to executed and register those
functions as well.

However, we need to make sure that this list is local for the variant
and not "globally" registered otherwise we keep add a dynamic function
to the global list which results in duplicate output becaus multiple
duplicate variants will be registered.
@RobinMalfait RobinMalfait changed the title Allow returning parallel variants from variant function Allow returning parallel variants from addVariant or matchVariant callback functions May 31, 2022
@RobinMalfait RobinMalfait merged commit d2fdf9e into master May 31, 2022
@RobinMalfait RobinMalfait deleted the fix/allow-variant-format-strings-from-function branch May 31, 2022 13:03
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.

None yet

1 participant