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

Fix duplicate inline filter references not working #1263

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

Pablete1234
Copy link
Member

Fixes duplicate inline filters complaining about no two filters being able to use the same id, when used as child nodes and not attributes.

  <any id="test-filter-1">
    <filter id="all(round-1, round-1-finished)"/>
    <filter id="all(round-2, round-2-finished)"/>
  </any>

  <all id="test-filter-2">
    <filter id="all(round-1, round-1-finished)"/>
    <filter id="all(round-2, round-2-finished)"/>
  </all>

In this scenario, pgm would complain that all(round-1, round-1-finished) is a duplicate id, because it is assuming it needs to register it, due to not being an XMLFilterReference (it's an all filter). This PR makes it so if a reference xml creation is for an already defined filter, it will use that one instead of creating a new one. That solves both not finding, and also adds caching to re-used inline filters that get used like this.

@Pablete1234 Pablete1234 added the feature New feature or request label Oct 28, 2023
@Pablete1234 Pablete1234 added the ready PR is ready to merge label Oct 29, 2023
@Electroid Electroid merged commit 0bf52b8 into dev Oct 30, 2023
2 checks passed
@Electroid Electroid deleted the fix-duplicate-inlines branch October 30, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request ready PR is ready to merge
Development

Successfully merging this pull request may close these issues.

3 participants